blob: 4e46cbf5ffa3dc82a574655d1a88dfd0f7e42aea [file] [log] [blame]
<project
name="Build specific targets and properties"
default="noDefault">
<property environment="env" />
<!-- ===================================================================== -->
<!-- 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.wst" />
</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.wst">
<property
name="archiveName"
value="wtp-wst-${buildLabel}.zip" />
<ant
antfile="${assembleScriptName}"
dir="${buildDirectory}" />
</target>
<target name="prePackage" />
<target name="postPackage">
<property
name="archiveName"
value="wtp-wst-${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>
<ant
antfile="${wtp.builder.home}/scripts/build/buildutilities.xml"
target="createChecksums">
<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/releng" />
</target>
<target
name="getMapFiles"
depends="checkLocal"
unless="mapsLocal">
<!-- *** change the repo info -->
<property
name="mapCvsRoot"
value=":${cvsProtocol}:${cvsUser}@${cvsServer}:${cvsRoot}" />
<property
name="mapVersionTag"
value="HEAD" />
<property
name="cvsPackage"
value="releng" />
<echo level="debug" message="${mapCvsRoot} ${mapVersionTag} " />
<echo level="debug" message="cvsPackage = ${cvsPackage} " />
<cvs
cvsRoot="${mapCvsRoot}"
package="${cvsPackage}"
dest="${buildDirectory}/maps"
tag="${mapVersionTag}"
quiet="${env.CVS_QUIET}"
reallyquiet="${env.CVS_REALLY_QUIET}" />
<!--tag the map files project-->
<antcall target="tagMapFiles">
<param
name="mapCvsRoot"
value="${mapCvsRoot}" />
</antcall>
</target>
<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}" />
<ant
antfile="${component.dir}/dependency.xml"
target="get">
<property
name="dependency.properties"
value="${buildDirectory}/maps/releng/maps/dependencies.properties" />
<property
name="base.install.dir"
value="${buildRoot}" />
</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. -->
<!-- Note: in version 2.0 (and previous) we need to build the
explorer war file by invoking script. In 3.0 forward, we do not,
so this simple existence check allows us to use the same script for
both streams -->
<!-- ===================================================================== -->
<property
name="buildwarfilename"
value="${buildDirectory}/plugins/org.eclipse.wst.ws.explorer/build-war.xml" />
<target
name="preAssemble"
depends="buildwar">
</target>
<target name="checkForBuildFile">
<condition property="buildFileExists">
<available file="${buildwarfilename}" />
</condition>
</target>
<target
name="buildwar"
depends="checkForBuildFile"
if="buildFileExists">
<ant antfile="${buildwarfilename}">
<property
name="baseLocation"
value="${baseLocation}" />
<property
name="basedir"
value="${buildDirectory}/plugins/org.eclipse.wst.ws.explorer" />
<property
name="buildDirectory"
value="${buildDirectory}" />
</ant>
</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 do to test the build results -->
<!-- ===================================================================== -->
<target name="test"></target>
<!-- ===================================================================== -->
<!-- Steps to do to publish the build results -->
<!-- ===================================================================== -->
<target name="publish"></target>
<!-- ===================================================================== -->
<!-- Helper targets -->
<!-- ===================================================================== -->
<target
name="gatherLogs"
if="logsAvailable">
<mkdir dir="${buildDirectory}/${buildLabel}/compilelogs" />
<echo level="debug" message="logExtension: ${logExtension}" />
<antcall target="allElements">
<param
name="target"
value="gatherLogs" />
<param
name="logExtension"
value="${logExtension}" />
</antcall>
<unzip
dest="${buildDirectory}/${buildLabel}/compilelogs"
overwrite="true">
<fileset dir="${buildDirectory}/features/org.eclipse.wst">
<include name="**/*.log.zip" />
</fileset>
</unzip>
<!-- workaround: see https://bugs.eclipse.org/bugs/show_bug.cgi?id=156043 -->
<copy
todir="${buildDirectory}/${buildLabel}/compilelogs"
overwrite="true">
<fileset
dir="${buildDirectory}/features/org.eclipse.wst.common_ui.feature/feature.temp.folder" />
</copy>
<copy
todir="${buildDirectory}/${buildLabel}/compilelogs"
overwrite="true">
<fileset
dir="${buildDirectory}/features/org.eclipse.wst.server_ui.feature/feature.temp.folder" />
</copy>
<copy
todir="${buildDirectory}/${buildLabel}/compilelogs"
overwrite="true">
<fileset
dir="${buildDirectory}/features/org.eclipse.wst.xml_ui.feature/feature.temp.folder" />
</copy>
<copy
todir="${buildDirectory}/${buildLabel}/compilelogs"
overwrite="true">
<fileset
dir="${buildDirectory}/features/org.eclipse.wst.ws_ui.feature/feature.temp.folder" />
</copy>
<copy
todir="${buildDirectory}/${buildLabel}/compilelogs"
overwrite="true">
<fileset
dir="${buildDirectory}/features/org.eclipse.wst.web_ui.feature/feature.temp.folder" />
</copy>
</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>