blob: 0b116b3236a473ba650806d9be330b800d25983f [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8"?>
<project
default="build"
basedir=".">
<fail
unless="wtp.builder.home"/>
<property
file="${wtp.builder.home}/build.properties"/>
<property
environment="env"/>
<!-- required to get proper value of doCreateFprojZips -->
<property
name="keyCfgFile"
value="${env.PROJECT_BUILDERS}/${projectname}/${env.RELENG}/maps/build.cfg"/>
<echo
level="info"
message="keyCfgFile: ${keyCfgFile}"/>
<property
file="${keyCfgFile}"/>
<echo
message="transformedRepoLocation: ${transformedRepoLocation}"/>
<mkdir
dir="${transformedRepoLocation}"/>
<!-- main -->
<target
name="build"
depends="getBaseBuilder">
<echoproperties/>
<dirname
file="${ant.file}"
property="distribution.wtp.build.dir"/>
<property
name="buildTargets"
value="${wtp.builder.home}/scripts/build/runbuild.xml"/>
<property
name="dependency.properties"
value="${buildDirectory}/maps/${env.RELENG}/${dependencyFileLocation}"/>
<!-- calling label.xml to createg label.properties file -->
<ant
antfile="${wtp.builder.home}/scripts/build/label.xml"/>
<echo
level="info"
message="invoking buildTargets: ${buildTargets} to build for each component"/>
<ant
antfile="${buildTargets}">
<property
name="component"
value="wst-sdk"/>
<property
name="eclipseBuildFailOnError"
value="false"/>
</ant>
<ant
antfile="${buildTargets}">
<property
name="component"
value="wst.tests"/>
<property
name="eclipseBuildFailOnError"
value="false"/>
</ant>
<ant
antfile="${buildTargets}">
<property
name="component"
value="jst-sdk"/>
<property
name="eclipseBuildFailOnError"
value="false"/>
</ant>
<ant
antfile="${buildTargets}">
<property
name="component"
value="jst.tests"/>
<property
name="eclipseBuildFailOnError"
value="false"/>
</ant>
<ant
antfile="${buildTargets}">
<property
name="component"
value="dali-sdk"/>
<property
name="eclipseBuildFailOnError"
value="false"/>
</ant>
<ant
antfile="${buildTargets}">
<property
name="component"
value="dali.tests"/>
<property
name="eclipseBuildFailOnError"
value="false"/>
</ant>
<!-- copy early, if we can ... else site won't be created, if we fail -->
<ant
antfile="${wtp.builder.home}/scripts/build/copyArtifactsEarly.xml"/>
<antcall
target="handleCompilationProblems"/>
<ant
antfile="${wtp.builder.home}/scripts/build/runAntRunner.xml">
<property
name="antrunnerfile"
value="${wtp.builder.home}/distribution/wtp.build/createFinalRepo.xml"/>
</ant>
<!-- package -->
<antcall
target="package"/>
</target>
<target
name="handleCompilationProblems"
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 -->
<echo
message="Compilation problems were found"
file="${buildDirectory}/${buildLabel}/compilationProblems.txt"/>
<!-- 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="The remaining build and tests were canceled since compilation problems were found."/>
</target>
<target
name="checkIfCompileProblems">
<!--
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>
<echo
message="compilation.problem path buildDirectory: ${buildDirectory}/plugins/*/"/>
</target>
<!-- invoking runbuild.xml targetting getBaseBuilder -->
<target
name="getBaseBuilder"
if="eclipse.builder.fetch">
<dirname
file="${ant.file}"
property="wtbuilder.dir"/>
<property
name="buildTargets"
value="${wtp.builder.home}/scripts/build/runbuild.xml"/>
<echo
level="info"
message="invoking buildTargets: ${buildTargets} -> getBaseBuilder"/>
<ant
antfile="${buildTargets}"
target="getBaseBuilder"/>
</target>
<target
name="package">
<!--
post, post packaging, for WTP ... "manually" assemble the
desired zips
-->
<ant
antfile="${wtp.builder.home}/scripts/build/runAntRunner.xml">
<property
name="antrunnerfile"
value="${wtp.builder.home}/distribution/wtp.build/createmainzips.xml"/>
</ant>
<ant
antfile="${wtp.builder.home}/scripts/build/runAntRunner.xml">
<property
name="antrunnerfile"
value="${wtp.builder.home}/distribution/wtp.build/createjaxws.xml"/>
</ant>
<ant
antfile="${wtp.builder.home}/scripts/build/runAntRunner.xml">
<property
name="antrunnerfile"
value="${wtp.builder.home}/distribution/wtp.build/createnoopzips.xml"/>
</ant>
<antcall
target="createFprojZips"/>
</target>
<!--
Handles packaging of individual Faceted Project Framework
distributions. Note the check on "requested and available" is simply
to avoid extra error messages, if the wtp zip failed to be created due
to some earlier error.
-->
<target
name="checkFprojConditions"
if="doCreateFprojZips">
<condition
property="requestedAndAvailable">
<available
file="${buildDirectory}/${buildLabel}/wtp-sdk-${buildLabel}.zip"/>
</condition>
</target>
<target
name="createFprojZips"
depends="checkFprojConditions"
if="requestedAndAvailable">
<delete
file="${buildDirectory}/${buildLabel}/wtp-common-fproj-${buildLabel}.zip"
failonerror="false"/>
<zip
destfile="${buildDirectory}/${buildLabel}/wtp-common-fproj-${buildLabel}.zip">
<zipfileset
src="${buildDirectory}/${buildLabel}/wtp-sdk-${buildLabel}.zip">
<include
name="eclipse/features/org.eclipse.wst.common.fproj_*/**"/>
<include
name="eclipse/plugins/org.eclipse.wst.common.project.facet.core_*.jar"/>
<include
name="eclipse/plugins/org.eclipse.wst.common.project.facet.ui_*.jar"/>
</zipfileset>
</zip>
<delete
file="${buildDirectory}/${buildLabel}/wtp-common-fproj-sdk-${buildLabel}.zip"
failonerror="false"/>
<zip
destfile="${buildDirectory}/${buildLabel}/wtp-common-fproj-sdk-${buildLabel}.zip">
<zipfileset
src="${buildDirectory}/${buildLabel}/wtp-common-fproj-${buildLabel}.zip"/>
<zipfileset
src="${buildDirectory}/${buildLabel}/wtp-sdk-${buildLabel}.zip">
<include
name="eclipse/features/org.eclipse.wst.common.fproj.sdk_*/**"/>
<include
name="eclipse/plugins/org.eclipse.wst.common.fproj.sdk_*.jar"/>
<include
name="eclipse/plugins/org.eclipse.wst.common.project.facet.doc.api_*.jar"/>
<include
name="eclipse/plugins/org.eclipse.wst.common.project.facet.core.source_*.jar"/>
<include
name="eclipse/plugins/org.eclipse.wst.common.project.facet.ui.source_*.jar"/>
</zipfileset>
</zip>
<delete
file="${buildDirectory}/${buildLabel}/wtp-common-fproj-enablement-jdt-${buildLabel}.zip"
failonerror="false"/>
<zip
destfile="${buildDirectory}/${buildLabel}/wtp-common-fproj-enablement-jdt-${buildLabel}.zip">
<zipfileset
src="${buildDirectory}/${buildLabel}/wtp-sdk-${buildLabel}.zip">
<include
name="eclipse/features/org.eclipse.jst.common.fproj.enablement.jdt_*/**"/>
<include
name="eclipse/plugins/org.eclipse.jst.common.project.facet.core_*.jar"/>
<include
name="eclipse/plugins/org.eclipse.jst.common.project.facet.ui_*.jar"/>
</zipfileset>
</zip>
<delete
file="${buildDirectory}/${buildLabel}/wtp-common-fproj-enablement-jdt-sdk-${buildLabel}.zip"
failonerror="false"/>
<zip
destfile="${buildDirectory}/${buildLabel}/wtp-common-fproj-enablement-jdt-sdk-${buildLabel}.zip">
<zipfileset
src="${buildDirectory}/${buildLabel}/wtp-common-fproj-enablement-jdt-${buildLabel}.zip"/>
<zipfileset
src="${buildDirectory}/${buildLabel}/wtp-sdk-${buildLabel}.zip">
<include
name="eclipse/features/org.eclipse.jst.common.fproj.enablement.jdt.sdk_*/**"/>
<include
name="eclipse/plugins/org.eclipse.jst.common.fproj.enablement.jdt.sdk_*.jar"/>
<include
name="eclipse/plugins/org.eclipse.jst.common.project.facet.core.source_*.jar"/>
<include
name="eclipse/plugins/org.eclipse.jst.common.project.facet.ui.source_*.jar"/>
</zipfileset>
</zip>
<ant
antfile="${wtp.builder.home}/scripts/build/buildutilitiesp2.xml"
target="createChecksums">
<property
name="buildDirectory"
value="${buildDirectory}"/>
<property
name="buildLabel"
value="${buildLabel}"/>
<property
name="archiveName"
value="wtp-common-fproj-${buildLabel}.zip"/>
</ant>
<ant
antfile="${wtp.builder.home}/scripts/build/buildutilitiesp2.xml"
target="createChecksums">
<property
name="buildDirectory"
value="${buildDirectory}"/>
<property
name="buildLabel"
value="${buildLabel}"/>
<property
name="archiveName"
value="wtp-common-fproj-sdk-${buildLabel}.zip"/>
</ant>
<ant
antfile="${wtp.builder.home}/scripts/build/buildutilitiesp2.xml"
target="createChecksums">
<property
name="buildDirectory"
value="${buildDirectory}"/>
<property
name="buildLabel"
value="${buildLabel}"/>
<property
name="archiveName"
value="wtp-common-fproj-enablement-jdt-${buildLabel}.zip"/>
</ant>
<ant
antfile="${wtp.builder.home}/scripts/build/buildutilitiesp2.xml"
target="createChecksums">
<property
name="buildDirectory"
value="${buildDirectory}"/>
<property
name="buildLabel"
value="${buildLabel}"/>
<property
name="archiveName"
value="wtp-common-fproj-enablement-jdt-sdk-${buildLabel}.zip"/>
</ant>
</target>
</project>