blob: a24b08b8532b83af61af07e32335a567d216063a [file]
<!--
Copyright (c) 2011, 2019 IBM Corporation and others.
This program and the accompanying materials
are made available under the terms of the Eclipse Public License 2.0
which accompanies this distribution, and is available at
https://www.eclipse.org/legal/epl-2.0/
SPDX-License-Identifier: EPL-2.0
Contributors:
IBM Corporation - initial API and implementation
-->
<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>