blob: 6d20fa1640ebf1a186356ab84a48dd2312b1c594 [file] [log] [blame]
<project
name="Build specific targets and properties"
default="noDefault">
<property
name="buildDirectory"
value="${buildDirectory}" />
<!-- ===================================================================== -->
<!-- Run a given ${target} on all elements being built -->
<!-- Add on <ant> task for each top level element being built. -->
<!-- ===================================================================== -->
<target name="allElements">
<echo message="Target:${target} " />
<echo message="basedir: ${basedir}" />
<echo message="buildDirectory: ${buildDirectory}" />
<echo message="baseLocation: ${baseLocation}" />
<ant
antfile="${genericTargets}"
target="${target}">
<property
name="type"
value="feature" />
<property
name="id"
value="org.eclipse.jst.sdk" />
</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.jst.sdk">
<property
name="archiveName"
value="wtp-jst-sdk-${buildLabel}.zip" />
<ant
antfile="${assembleScriptName}"
dir="${buildDirectory}" />
</target>
<target name="prePackage" />
<target name="postPackage">
<property
name="archiveName"
value="wtp-jst-sdk-${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/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 message="${mapCvsRoot} ${mapVersionTag} " />
<echo message="cvsPackage = ${cvsPackage} " />
<cvs
cvsRoot="${mapCvsRoot}"
package="${cvsPackage}"
dest="${buildDirectory}/maps"
tag="${mapVersionTag}" />
<cvs
cvsRoot="${mapCvsRoot}"
package="releng-jsf"
dest="${buildDirectory}/maps"
tag="${mapVersionTag}" />
<!--tag the map files project-->
<antcall target="tagMapFiles">
<param
name="mapCvsRoot"
value="${mapCvsRoot}" />
</antcall>
<!-- copy all maps to the same place. Be sure to copy only "maps", as there may be "dependancies" etc,
in releng-jsf that would be out of date -->
<copy todir="${buildDirectory}/maps/releng/maps">
<fileset dir="${buildDirectory}/maps/releng-jsf/maps">
<include name="*.map" />
</fileset>
</copy>
</target>
<target
name="tagMapFiles"
if="tagMaps">
<cvs
cvsRoot="${mapCvsRoot}"
dest="${buildDirectory}/maps"
command="tag v${buildType}${timestamp}" />
</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 message="ant.file: ${ant.file}" />
<echo 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>
<condition
property="packAllInOne"
value="true">
<and>
<equals
arg1="true"
arg2="${build.pack-all-in-one}" />
</and>
</condition>
<antcall target="all-in-one">
<param
name="bos"
value="win32" />
<param
name="bws"
value="win32" />
<param
name="barch"
value="x86" />
<param
name="iszip"
value="true" />
</antcall>
<antcall target="all-in-one">
<param
name="bos"
value="linux" />
<param
name="bws"
value="gtk" />
<param
name="barch"
value="x86" />
<param
name="istar"
value="true" />
</antcall>
<antcall target="all-in-one">
<param
name="bos"
value="macosx" />
<param
name="bws"
value="carbon" />
<param
name="barch"
value="ppc" />
<param
name="istar"
value="true" />
</antcall>
</target>
<target
name="all-in-one"
if="packAllInOne">
<delete
dir="${buildDirectory}/${buildLabel}/temp"
failonerror="false" />
<mkdir dir="${buildDirectory}/${buildLabel}/temp" />
<ant
antfile="${component.dir}/dependency.xml"
target="get">
<property
name="basearch"
value="${barch}" />
<property
name="baseos"
value="${bos}" />
<property
name="basews"
value="${bws}" />
<property
name="dependency.properties"
value="${buildDirectory}/maps/releng/maps/dependencies.properties" />
<property
name="base.install.dir"
value="${buildDirectory}/${buildLabel}/temp" />
</ant>
<unzip
src="${buildDirectory}/${buildLabel}/wtp-sdk-${buildLabel}.zip"
dest="${buildDirectory}/${buildLabel}/temp" />
<copy todir="${buildDirectory}/${buildLabel}/temp">
<fileset dir="${component.dir}/prod">
<include name="**/*" />
</fileset>
</copy>
<antcall target="pack-all-in-one-tar"></antcall>
<antcall target="pack-all-in-one-zip"></antcall>
</target>
<target
name="pack-all-in-one-tar"
if="istar">
<property
name="packName"
value="wtp-all-in-one-sdk-${buildLabel}-${bos}-${bws}.tar.gz" />
<tar
longfile="gnu"
compression="gzip"
destfile="${buildDirectory}/${buildLabel}/${packName}"
excludes="installmanifest.properties"
basedir="${buildDirectory}/${buildLabel}/temp" />
<antcall target="checksum-all-in-one">
<param
name="packName"
value="${packName}" />
</antcall>
</target>
<target
name="pack-all-in-one-zip"
if="iszip">
<property
name="packName"
value="wtp-all-in-one-sdk-${buildLabel}-${bos}.zip" />
<zip destfile="${buildDirectory}/${buildLabel}/${packName}">
<fileset dir="${buildDirectory}/${buildLabel}/temp">
<include name="**/*" />
<exclude name="installmanifest.properties" />
</fileset>
</zip>
<antcall target="checksum-all-in-one">
<param
name="packName"
value="${packName}" />
</antcall>
</target>
<target name="checksum-all-in-one">
<mkdir dir="${buildDirectory}/${buildLabel}/checksum" />
<checksum
file="${buildDirectory}/${buildLabel}/${packName}"
property="md5" />
<echo
message="${md5} *${archiveName}"
file="${buildDirectory}/${buildLabel}/checksum/${packName}.md5" />
<echo
message="${md5}"
file="${buildDirectory}/${buildLabel}/checksum/${packName}.md5antformat" />
</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">
<!--
<ant antfile="${relengDir}/fetchVendorContent.xml" target="cleanup">
<property name="basedir" value="${relengDir}"/>
<property name="buildDirectory" value="${buildDirectory}/plugins"/>
<property name="sdk" value="true"/>
</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 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.jst.sdk">
<include name="**/*.log.zip" />
</fileset>
</unzip>
<!-- workaround: see https://bugs.eclipse.org/bugs/show_bug.cgi?id=156043 -->
<!-- and https://bugs.eclipse.org/bugs/show_bug.cgi?id=172361 -->
<copy
todir="${buildDirectory}/${buildLabel}/compilelogs"
overwrite="true">
<fileset
dir="${buildDirectory}/features/org.eclipse.jst.enterprise_ui.feature/feature.temp.folder" />
</copy>
<copy
todir="${buildDirectory}/${buildLabel}/compilelogs"
overwrite="true">
<fileset
dir="${buildDirectory}/features/org.eclipse.jst.server_ui.feature/feature.temp.folder" />
</copy>
<copy
todir="${buildDirectory}/${buildLabel}/compilelogs"
overwrite="true">
<fileset
dir="${buildDirectory}/features/org.eclipse.jst.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 message="You must specify a target when invoking this file" />
</target>
</project>