blob: c25f15f8c7f8cfb2156ab93e42bc66020fca0c8b [file] [log] [blame]
<project
name="PDECustomTargets"
default="noDefault"
basedir=".">
<!-- = = = standard properties pattern = = = -->
<!--
Note to be cross-platform, "environment variables" are only appropriate for
some variables, e.g. ones we set, since properties are case sensitive, even if
the environment variables on your operating system are not, e.g. it will
be ${env.Path} not ${env.PATH} on Windows -->
<property environment="env" />
<!--
Let users override standard properties, if desired.
If directory, file, or some properties do not exist,
then standard properties will be used.
-->
<property
file="${env.LOCAL_BUILD_PROPERTIES_DIR}/${ant.project.name}.properties" />
<!-- let this project specify properties, if not already set -->
<property file="build.properties" />
<property
name="cvsProtocol"
value="${env.BUILD_CVS_WRITE_PROTOCOL}" />
<property
name="cvsUser"
value="${env.BUILD_CVS_WRITE_USER}" />
<property
name="cvsServer"
value="${env.BUILD_CVS_SERVER}" />
<property
name="cvsRoot"
value="${env.BUILD_CVS_ROOT}" />
<!-- ===================================================================== -->
<!-- Run a given ${target} on all elements being built -->
<!-- Add on <ant> task for each top level element being built. -->
<!-- ===================================================================== -->
<target name="allElements">
<echo
level="info"
message="Target: ${target} " />
<echo
level="debug"
message="basedir: ${basedir}" />
<echo
level="debug"
message="buildDirectory: ${buildDirectory}" />
<echo
level="debug"
message="baseLocation: ${baseLocation}" />
<echo
level="debug"
message="generic target: ${genericTargets}" />
<ant
antfile="${genericTargets}"
target="${target}">
<property
name="type"
value="feature" />
<property
name="id"
value="org.eclipse.jpt.tests" />
</ant>
</target>
<!-- ===================================================================== -->
<!-- Targets to assemble the built elements for particular configurations -->
<!-- These generally call the generated assemble scripts (named in -->
<!-- ${assembleScriptName}) but may also add pre and post processing -->
<!-- Add one target for each root element and each configuration -->
<!-- ===================================================================== -->
<target name="assemble.org.eclipse.jpt.tests">
<property
name="archiveName"
value="wtp-jpt-Automated-Tests-${buildLabel}.zip" />
<ant
antfile="${assembleScriptName}"
dir="${buildDirectory}" />
</target>
<target name="prePackage" />
<target name="postPackage">
<property
name="archiveName"
value="wtp-jpt-Automated-Tests-${buildLabel}.zip" />
<ant
antfile="${wtp.builder.home}/scripts/build/buildutilities.xml"
target="unpackUpdateJarsAndCreateZippedPackages">
<property
name="buildDirectory"
value="${buildDirectory}" />
<property
name="buildLabel"
value="${buildLabel}" />
<property
name="archiveName"
value="${archiveName}" />
</ant>
</target>
<!-- ===================================================================== -->
<!-- Check out map files from correct repository -->
<!-- Replace values for cvsRoot, package and mapVersionTag as desired. -->
<!-- ===================================================================== -->
<target name="checkLocal">
<available
property="mapsLocal"
file="${buildDirectory}/maps/${env.RELENGDALI}" />
</target>
<target
name="getMapFiles"
depends="checkLocal"
unless="mapsLocal">
<!-- *** change the repo info -->
<property
name="mapCvsRoot"
value=":${cvsProtocol}:${cvsUser}@${cvsServer}:${cvsRoot}" />
<!-- if not otherwise set, use these default values -->
<property
name="mapVersionTag"
value="HEAD" />
<property
name="releng.dali-mapVersionTag"
value="HEAD" />
<!-- get primary maps first, since if there happens to be
duplicates, the first one "wins" (such as for dependancies.properties)
-->
<!-- get releng maps -->
<antcall target="checkOutMaps">
<param
name="cvsPackage"
value="${env.RELENG}" />
<param
name="versionTagParam"
value="${mapVersionTag}" />
</antcall>
<!-- get releng.dali/maps -->
<antcall target="checkOutMaps">
<param
name="cvsPackage"
value="${env.RELENGDALI}" />
<param
name="versionTagParam"
value="${releng.dali-mapVersionTag}" />
</antcall>
<!-- tag the map files project -->
<antcall target="tagMapFiles">
<param
name="mapCvsRoot"
value="${mapCvsRoot}" />
</antcall>
</target>
<!-- ===================================================================== -->
<!-- Check out the cvsPackage -->
<!-- ===================================================================== -->
<target name="checkOutMaps">
<echo
level="info"
message="mapCvsRoot: ${mapCvsRoot}" />
<echo
level="info"
message="cvsPackage = ${cvsPackage} " />
<echo
level="info"
message="versionTagParam: ${versionTagParam}" />
<cvs
cvsRoot="${mapCvsRoot}"
package="${cvsPackage}"
dest="${buildDirectory}/maps"
tag="${versionTagParam}"
quiet="${env.CVS_QUIET}"
reallyquiet="${env.CVS_REALLY_QUIET}" />
</target>
<!-- ===================================================================== -->
<!-- Tag Map Files mapCvsRoot -->
<!-- ===================================================================== -->
<target
name="tagMapFiles"
if="tagMaps">
<cvs
cvsRoot="${mapCvsRoot}"
dest="${buildDirectory}/maps"
command="tag v${buildType}${timestamp}"
quiet="${env.CVS_QUIET}"
reallyquiet="${env.CVS_REALLY_QUIET}" />
</target>
<!-- ===================================================================== -->
<!-- Steps to do before setup -->
<!-- ===================================================================== -->
<target name="preSetup"></target>
<!-- ===================================================================== -->
<!-- Steps to do after setup but before starting the build proper -->
<!-- ===================================================================== -->
<target name="postSetup">
<dirname
file="${ant.file}"
property="component.dir" />
<echo
level="debug"
message="ant.file: ${ant.file}" />
<echo
level="debug"
message="component.dir: ${component.dir}" />
<property
name="dependencies.combined"
value="dependencies.combined.properties" />
<!-- Combine releng and releng.dali -->
<delete
file="${buildDirectory}/maps/${env.RELENGDALI}/maps/${dependencies.combined}"
failonerror="false" />
<concat
destfile="${buildDirectory}/maps/${env.RELENGDALI}/maps/${dependencies.combined}">
<fileset dir="${buildDirectory}/maps">
<include
name="${env.RELENG}/maps/dependencies.properties" />
<include
name="${env.RELENGDALI}/maps/dali.dependencies.properties" />
</fileset>
</concat>
<ant
antfile="${component.dir}/dependency.xml"
target="get">
<property
name="dependency.properties"
value="${buildDirectory}/maps/${env.RELENGDALI}/maps/${dependencies.combined}" />
<property
name="base.install.dir"
value="${buildRoot}" />
</ant>
<!--fetch the additional pieces to build tests -->
<property
name="featureOnly"
value="false" />
<property
name="featureAndPlugins"
value="true" />
<property
name="featuresRecursively"
value="true" />
<ant
antfile="${genericTargets}"
dir="${pde.build.scripts}"
target="fetchElement">
<property
name="type"
value="feature" />
<property
name="id"
value="org.eclipse.jpt.feature" />
</ant>
</target>
<!-- ===================================================================== -->
<!-- Steps to do before fetching the build elements -->
<!-- ===================================================================== -->
<target name="preFetch"></target>
<!-- ===================================================================== -->
<!-- Steps to do after fetching the build elements -->
<!-- ===================================================================== -->
<target name="postFetch"></target>
<!-- ===================================================================== -->
<!-- Steps to do before generating the build scripts. -->
<!-- ===================================================================== -->
<target name="postGenerate">
<customizeAccessRules
bundleDirectory="${buildDirectory}/plugins"
defaultRules="+org/eclipse/wst/**/*, +org/eclipse/jst/**/*" />
</target>
<!-- ===================================================================== -->
<!-- Steps to do after generating the build scripts. -->
<!-- ===================================================================== -->
<target name="preGenerate"></target>
<!-- ===================================================================== -->
<!-- Steps to do before running the build.xmls for the elements being built. -->
<!-- ===================================================================== -->
<target name="preProcess">
<replace
dir="${buildDirectory}/plugins"
value="${timestamp}"
token="@build@">
<include name="**/about.mappings" />
</replace>
</target>
<!-- ===================================================================== -->
<!-- Steps to do after running the build.xmls for the elements being built. -->
<!-- ===================================================================== -->
<target name="postProcess">
<condition property="logsAvailable">
<istrue value="${javacVerbose}" />
</condition>
<antcall target="gatherLogs" />
</target>
<!-- ===================================================================== -->
<!-- Steps to do before running assemble. -->
<!-- ===================================================================== -->
<target name="preAssemble"></target>
<!-- ===================================================================== -->
<!-- Steps to do after running assemble. -->
<!-- ===================================================================== -->
<target name="postAssemble"></target>
<!-- ===================================================================== -->
<!-- Steps to do after the build is done. -->
<!-- ===================================================================== -->
<target name="postBuild"></target>
<!-- ===================================================================== -->
<!-- Steps to test the build results -->
<!-- ===================================================================== -->
<target
name="test"
unless="dontRunTests">
<property
name="eclipseAutomatedTestHome"
value="${buildDirectory}/plugins/org.eclipse.jpt.utility.tests" />
<echo
level="info"
message="Setting up tests in ${eclipseAutomatedTestHome}" />
<copy
file="${buildDirectory}/${buildLabel}/wtp-jpt-${buildLabel}.zip"
tofile="${eclipseAutomatedTestHome}/eclipse-SDK-wtp-jpt-${buildLabel}.zip" />
<copy
file="${buildDirectory}/${buildLabel}/wtp-jpt-Automated-Tests-${buildLabel}.zip"
tofile="${eclipseAutomatedTestHome}/eclipse-junit-tests-wtp-jpt-${buildLabel}.zip" />
<ant
antfile="${eclipseAutomatedTestHome}/test.xml"
target="run"
dir="${eclipseAutomatedTestHome}">
<property
name="os"
value="${baseos}" />
<property
name="ws"
value="${basews}" />
<property
name="arch"
value="${basearch}" />
<property
name="eclipse-home"
value="${baseLocation}" />
</ant>
</target>
<!-- ===================================================================== -->
<!-- Steps to do to publish the build results -->
<!-- ===================================================================== -->
<target name="publish"></target>
<!-- ===================================================================== -->
<!-- Helper targets -->
<!-- ===================================================================== -->
<target
name="gatherLogs"
if="logsAvailable">
<mkdir dir="${buildDirectory}/${buildLabel}/testcompilelogs" />
<echo
level="debug"
message="logExtension: ${logExtension}" />
<antcall target="allElements">
<param
name="target"
value="gatherLogs" />
<param
name="logExtension"
value="${logExtension}" />
</antcall>
<unzip
dest="${buildDirectory}/${buildLabel}/testcompilelogs"
overwrite="true">
<fileset
dir="${buildDirectory}/features/org.eclipse.jpt.tests">
<include name="**/*.log.zip" />
</fileset>
</unzip>
</target>
<target
name="clean"
unless="noclean">
<antcall target="allElements">
<param
name="target"
value="cleanElement" />
</antcall>
</target>
<!-- ===================================================================== -->
<!-- Default target -->
<!-- ===================================================================== -->
<target name="noDefault">
<echo
level="error"
message="You must specify a target when invoking this file" />
</target>
</project>