| <project |
| default="checkForCompilationProblems" |
| basedir="."> |
| |
| |
| <target |
| name="checkForCompilationProblems" |
| depends="checkIfCompileProblems" |
| if="compilation.problem.found"> |
| |
| <!-- if there is a problem, leave a marker file in download directory, so the webpage can |
| describe what happened --> |
| |
| <property |
| name="reasonForFailure" |
| value="Compilation problems were found. The remaining build and tests were canceled."/> |
| <echo |
| message="${reasonForFailure}" |
| file="${buildDirectory}/${buildLabel}/compilationProblems.txt"/> |
| <echo message="${reasonForFailure}"/> |
| |
| <!-- always force an early copy, before fail, so all results and files get to "downloads" area --> |
| <ant antfile="${wtp.builder.home}/scripts/build/copyArtifactsEarly.xml"/> |
| <fail |
| if="compilation.problem.found" |
| message="${reasonForFailure}"/> |
| </target> |
| |
| |
| <target name="checkIfCompileProblems"> |
| <echo message="compilation.problem path buildDirectory: ${buildDirectory}/plugins/*/"/> |
| |
| <!-- |
| Not sure how reliable the presence of this 'compilation.problem' file is ... |
| I just noticed it in recent PDE builds with compile problems. |
| May have to make this "fancier" in future. |
| For now, looks only one level down in plugins directory (in build's workdir) for a file with |
| the name 'complilation.problem'. We may have a "summary" in xml file format, summarizing logs, |
| ... but not sure then created (during site? We'd have to call site first. This way, we'll see if the match :) . |
| --> |
| <available |
| file="compilation.problem" |
| type="file" |
| property="compilation.problem.found"> |
| <filepath> |
| <dirset dir="${buildDirectory}"> |
| <include name="plugins/*"/> |
| </dirset> |
| |
| </filepath> |
| </available> |
| </target> |
| |
| </project> |