diff --git a/releng.wtpbuilder/scripts/build/build.xml b/releng.wtpbuilder/scripts/build/build.xml index 418f97ef40c47cf9c67fecd8890c43243d0c6a0a..8c1bdbb11afbf5ea2c4fdafd952dc53a8ca98024 100644 --- a/releng.wtpbuilder/scripts/build/build.xml +++ b/releng.wtpbuilder/scripts/build/build.xml @@ -1,158 +1,257 @@ <project default="runBuild"> - <target name="runBuild"> - <dirname file="${ant.file}" property="scripts.build.dir" /> - <property name="wtp.builder.home" value="${scripts.build.dir}/../.." /> - - <antcall target="runEclipseBuild"> - <param name="wtp.builder.home" value="${wtp.builder.home}" /> - </antcall> - <antcall target="runEclipseBuildStamped"> - <param name="wtp.builder.home" value="${wtp.builder.home}" /> - </antcall> - </target> - - - - <target name="build" depends="init"> - - <!--this property required as of Eclipse 3.0 stream builds > 20031126 --> - <property name="buildingOSGi" value="true" /> - - <!-- this generateFeatureVersionSuffix property causes feature - suffixes to be calcuated based on their - own CVS tag, plus the qualifier of their contained plugins --> - <!-- - https://bugs.eclipse.org/bugs/show_bug.cgi?id=138825 - false for builds intended for 3.1.2, since can generate underscores - true for builds instended for 3.2 - --> - <property name="generateFeatureVersionSuffix" value="true" /> - - <property name="outputUpdateJars" value="true" /> - - <!--run the build for the specified component--> - <echo message="basedir: ${basedir}" /> - <echo message="component: ${component}" /> - <echo message="buildDirectory: ${buildDirectory}" /> - <echo message="wtp.builder.home: ${wtp.builder.home}" /> - - <ant antfile="build.xml" dir="${pde.build.scripts}"> - <property name="builder" value="${wtp.builder.home}/components/${component}" /> - <property name="wtp.builder.home" value="${wtp.builder.home}" /> - <property name="buildBranch" value="${buildBranch}" /> - <property name="cvsUser" value="${cvsUser}" /> - <property name="cvsProtocol" value="${cvsProtocol}" /> - <property name="dependencyTargets" value="${wtp.builder.home}/scripts/dependency/build.xml" /> - <property name="local.cache.dir" value="${build.home}/${build.local.repository}" /> - <property name="baseLocation" value="${build.home}/${build.current}-${build.distribution}-${buildBranch}-${buildType}/${base.location}" /> - <property name="buildBranch" value="${buildBranch}" /> - <property name="build.pack-all-in-one" value="${build.pack-all-in-one}"/> - <property name="buildRoot" value="${build.home}/${build.current}-${build.distribution}-${buildBranch}-${buildType}" /> - <property name="testRoot" value="${build.home}/${build.tests}-${build.distribution}-${buildBranch}-${buildType}" /> - <property name="performanceRoot" value="${build.home}/${build.perf.tests}-${buildType}" /> - </ant> - </target> - - <target name="checkBaseBuilder"> - <available property="basebuilderLocal" file="${pde.builder.path}" /> - </target> - - <target name="getBaseBuilder" depends="checkBaseBuilder" unless="basebuilderLocal"> - <!-- *** change the repo info --> - <property name="builderCvsRoot" value=":pserver:anonymous@dev.eclipse.org:/cvsroot/eclipse" /> - <!-- note: the HEAD version of base builder is not good to use. - in some cases, won't run at all, in the best of cases, will simply - be unstable, as its the development version --> - <property name="eclipse.builder.version" value="r311_vM20050914-1235" /> - <mkdir dir="${build.home}/builders/${eclipse.builder.version}" /> - <cvs cvsRoot="${builderCvsRoot}" package="org.eclipse.releng.basebuilder" dest="${build.home}/builders/${eclipse.builder.version}" tag="${eclipse.builder.version}" /> - </target> - - - <target name="init"> - - - <condition property="buildBranch" value="R2.0"> - <equals arg1="${mapVersionTag}" arg2="HEAD" /> - </condition> - <condition property="buildBranch" value="R0.7"> - <equals arg1="${mapVersionTag}" arg2="R0_7_maintenance" /> - </condition> - <condition property="buildBranch" value="R1.0"> - <equals arg1="${mapVersionTag}" arg2="R1_0_maintenance" /> - </condition> - <condition property="buildBranch" value="R1.5"> - <equals arg1="${mapVersionTag}" arg2="R1_5_maintenance" /> - </condition> - - - <property file="${wtp.builder.home}/build.properties" /> - <touch file="${user.home}/.cvspass" /> - - <ant antfile="${wtp.builder.home}/scripts/build/label.xml" /> - <property file="${buildDirectory}/label.properties" /> - - <!--fetch the HEAD stream of all projects if build type specified as N--> - <condition property="fetchTag" value="HEAD"> - <equals arg1="${buildType}" arg2="N" /> - </condition> - - <condition property="tagMaps"> - <equals arg1="${build.trial}" arg2="false" /> - </condition> - </target> - - <target name="runEclipseBuild" if="buildId"> - <java taskname="build-${build.distribution}-${component}" classpath="${pde.builder.path}/startup.jar" fork="true" classname="org.eclipse.core.launcher.Main" failonerror="true"> - <jvmarg value="-Dosgi.ws=${basews}" /> - <jvmarg value="-Dosgi.os=${baseos}" /> - <jvmarg value="-Dosgi.arch=${basearch}" /> - <jvmarg value="-Dbuild.home=${build.home}" /> - <jvmarg value="-Dbuild.trial=${build.trial}" /> - <jvmarg value="-DbuildType=${buildType}" /> - <jvmarg value="-DbuildId=${buildId}" /> - <jvmarg value="-DjavacDebugInfo=${javacDebugInfo}" /> - <jvmarg value="-DmapVersionTag=${mapVersionTag}" /> - <jvmarg value="-DcvsUser=${cvsUser}" /> - <jvmarg value="-DcvsProtocol=${cvsProtocol}" /> - <jvmarg value="-Dwtp.builder.home=${wtp.builder.home}" /> - <jvmarg value="-Dbuild.distribution=${build.distribution}" /> - <jvmarg value="-Dcomponent=${component}" /> + <!-- 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" /> + + <target name="runBuild"> + <dirname + file="${ant.file}" + property="scripts.build.dir" /> + <property + name="wtp.builder.home" + value="${scripts.build.dir}/../.." /> + + <antcall target="runEclipseBuild"> + <param + name="wtp.builder.home" + value="${wtp.builder.home}" /> + </antcall> + <antcall target="runEclipseBuildStamped"> + <param + name="wtp.builder.home" + value="${wtp.builder.home}" /> + </antcall> + </target> + + + + <target + name="build" + depends="init"> + + <!--this property required as of Eclipse 3.0 stream builds > 20031126 --> + <property + name="buildingOSGi" + value="true" /> + + <!-- this generateFeatureVersionSuffix property causes feature + suffixes to be calcuated based on their + own CVS tag, plus the qualifier of their contained plugins --> + <!-- + https://bugs.eclipse.org/bugs/show_bug.cgi?id=138825 + false for builds intended for 3.1.2, since can generate underscores + true for builds instended for 3.2 + --> + <property + name="generateFeatureVersionSuffix" + value="true" /> + + <property + name="outputUpdateJars" + value="true" /> + + <!--run the build for the specified component--> + <echo message="basedir: ${basedir}" /> + <echo message="component: ${component}" /> + <echo message="buildDirectory: ${buildDirectory}" /> + <echo message="wtp.builder.home: ${wtp.builder.home}" /> + + <ant + antfile="build.xml" + dir="${pde.build.scripts}"> + <property + name="builder" + value="${wtp.builder.home}/components/${component}" /> + <property + name="wtp.builder.home" + value="${wtp.builder.home}" /> + <property + name="buildBranch" + value="${buildBranch}" /> + <property + name="cvsUser" + value="${cvsUser}" /> + <property + name="cvsProtocol" + value="${cvsProtocol}" /> + <property + name="dependencyTargets" + value="${wtp.builder.home}/scripts/dependency/build.xml" /> + <property + name="local.cache.dir" + value="${build.home}/${build.local.repository}" /> + <property + name="baseLocation" + value="${build.home}/${build.current}-${build.distribution}-${buildBranch}-${buildType}/${base.location}" /> + <property + name="buildBranch" + value="${buildBranch}" /> + <property + name="build.pack-all-in-one" + value="${build.pack-all-in-one}" /> + <property + name="buildRoot" + value="${build.home}/${build.current}-${build.distribution}-${buildBranch}-${buildType}" /> + <property + name="testRoot" + value="${build.home}/${build.tests}-${build.distribution}-${buildBranch}-${buildType}" /> + <property + name="performanceRoot" + value="${build.home}/${build.perf.tests}-${buildType}" /> + </ant> + </target> + + <target name="checkBaseBuilder"> + <available + property="basebuilderLocal" + file="${pde.builder.path}" /> + </target> + + <target + name="getBaseBuilder" + depends="checkBaseBuilder" + unless="basebuilderLocal"> + <!-- *** change the repo info --> + <property + name="builderCvsRoot" + value=":pserver:anonymous@dev.eclipse.org:/cvsroot/eclipse" /> + <!-- note: the HEAD version of base builder is not good to use. + in some cases, won't run at all, in the best of cases, will simply + be unstable, as its the development version --> + <property + name="eclipse.builder.version" + value="r311_vM20050914-1235" /> + <mkdir dir="${build.home}/builders/${eclipse.builder.version}" /> + <cvs + cvsRoot="${builderCvsRoot}" + package="org.eclipse.releng.basebuilder" + dest="${build.home}/builders/${eclipse.builder.version}" + tag="${eclipse.builder.version}" /> + </target> + + + <target name="init"> + + + <condition + property="buildBranch" + value="R2.0"> + <equals + arg1="${mapVersionTag}" + arg2="HEAD" /> + </condition> + <condition + property="buildBranch" + value="R0.7"> + <equals + arg1="${mapVersionTag}" + arg2="R0_7_maintenance" /> + </condition> + <condition + property="buildBranch" + value="R1.0"> + <equals + arg1="${mapVersionTag}" + arg2="R1_0_maintenance" /> + </condition> + <condition + property="buildBranch" + value="R1.5"> + <equals + arg1="${mapVersionTag}" + arg2="R1_5_maintenance" /> + </condition> + + + <property file="${wtp.builder.home}/build.properties" /> + <touch file="${user.home}/.cvspass" /> + + <ant antfile="${wtp.builder.home}/scripts/build/label.xml" /> + <property file="${buildDirectory}/label.properties" /> + + <!--fetch the HEAD stream of all projects if build type specified as N--> + <condition + property="fetchTag" + value="HEAD"> + <equals + arg1="${buildType}" + arg2="N" /> + </condition> + + <condition property="tagMaps"> + <equals + arg1="${build.trial}" + arg2="false" /> + </condition> + </target> + + <target + name="runEclipseBuild" + if="buildId"> + <java + taskname="build-${build.distribution}-${component}" + classpath="${pde.builder.path}/startup.jar" + fork="true" + classname="org.eclipse.core.launcher.Main" + failonerror="true"> + <jvmarg value="-Dosgi.ws=${basews}" /> + <jvmarg value="-Dosgi.os=${baseos}" /> + <jvmarg value="-Dosgi.arch=${basearch}" /> + <jvmarg value="-Dbuild.home=${build.home}" /> + <jvmarg value="-Dbuild.trial=${build.trial}" /> + <jvmarg value="-DbuildType=${buildType}" /> + <jvmarg value="-DbuildId=${buildId}" /> + <jvmarg value="-DjavacDebugInfo=${javacDebugInfo}" /> + <jvmarg value="-DmapVersionTag=${mapVersionTag}" /> + <jvmarg value="-DcvsUser=${cvsUser}" /> + <jvmarg value="-DcvsProtocol=${cvsProtocol}" /> + <jvmarg value="-Dwtp.builder.home=${wtp.builder.home}" /> + <jvmarg value="-Dbuild.distribution=${build.distribution}" /> + <jvmarg value="-Dcomponent=${component}" /> <jvmarg value="-Djava15-home=${java15-home}" /> <jvmarg value="-DJ2SE-1.5=${J2SE-1.5}" /> <jvmarg value="-DJ2SE-1.4=${J2SE-1.4}" /> - <arg value="-application" /> - <arg value="org.eclipse.ant.core.antRunner" /> - <arg value="-buildfile" /> - <arg value="${ant.file}" /> - <arg value="build" /> - </java> - </target> - - <target name="runEclipseBuildStamped" unless="buildId"> - <java taskname="build-${build.distribution}-${component}" classpath="${pde.builder.path}/startup.jar" fork="true" classname="org.eclipse.core.launcher.Main" failonerror="true"> - <jvmarg value="-Dosgi.ws=${basews}" /> - <jvmarg value="-Dosgi.os=${baseos}" /> - <jvmarg value="-Dosgi.arch=${basearch}" /> - <jvmarg value="-Dbuild.home=${build.home}" /> - <jvmarg value="-Dbuild.trial=${build.trial}" /> - <jvmarg value="-DbuildType=${buildType}" /> - <jvmarg value="-DjavacDebugInfo=${javacDebugInfo}" /> - <jvmarg value="-DmapVersionTag=${mapVersionTag}" /> - <jvmarg value="-DcvsUser=${cvsUser}" /> - <jvmarg value="-DcvsProtocol=${cvsProtocol}" /> - <jvmarg value="-Dwtp.builder.home=${wtp.builder.home}" /> - <jvmarg value="-Dbuild.distribution=${build.distribution}" /> - <jvmarg value="-Dcomponent=${component}" /> + <arg value="-application" /> + <arg value="org.eclipse.ant.core.antRunner" /> + <arg value="-buildfile" /> + <arg value="${ant.file}" /> + <arg value="build" /> + </java> + </target> + + <target + name="runEclipseBuildStamped" + unless="buildId"> + <java + taskname="build-${build.distribution}-${component}" + classpath="${pde.builder.path}/startup.jar" + fork="true" + classname="org.eclipse.core.launcher.Main" + failonerror="true"> + <jvmarg value="-Dosgi.ws=${basews}" /> + <jvmarg value="-Dosgi.os=${baseos}" /> + <jvmarg value="-Dosgi.arch=${basearch}" /> + <jvmarg value="-Dbuild.home=${build.home}" /> + <jvmarg value="-Dbuild.trial=${build.trial}" /> + <jvmarg value="-DbuildType=${buildType}" /> + <jvmarg value="-DjavacDebugInfo=${javacDebugInfo}" /> + <jvmarg value="-DmapVersionTag=${mapVersionTag}" /> + <jvmarg value="-DcvsUser=${cvsUser}" /> + <jvmarg value="-DcvsProtocol=${cvsProtocol}" /> + <jvmarg value="-Dwtp.builder.home=${wtp.builder.home}" /> + <jvmarg value="-Dbuild.distribution=${build.distribution}" /> + <jvmarg value="-Dcomponent=${component}" /> <jvmarg value="-Djava15-home=${java15-home}" /> <jvmarg value="-DJ2SE-1.5=${J2SE-1.5}" /> <jvmarg value="-DJ2SE-1.4=${J2SE-1.4}" /> - <arg value="-application" /> - <arg value="org.eclipse.ant.core.antRunner" /> - <arg value="-buildfile" /> - <arg value="${ant.file}" /> - <arg value="build" /> - </java> - </target> + <arg value="-application" /> + <arg value="org.eclipse.ant.core.antRunner" /> + <arg value="-buildfile" /> + <arg value="${ant.file}" /> + <arg value="build" /> + </java> + </target> </project> diff --git a/releng.wtpbuilder/scripts/build/buildutilities.xml b/releng.wtpbuilder/scripts/build/buildutilities.xml index c2c94ced4788035ab780415194e4b6f3e3bfd700..8ff14ece3ab4938dd09bd969b46d6ad3e233d36f 100644 --- a/releng.wtpbuilder/scripts/build/buildutilities.xml +++ b/releng.wtpbuilder/scripts/build/buildutilities.xml @@ -1,9 +1,12 @@ <?xml version="1.0" encoding="UTF-8"?> -<project name="Build Utility Tasks" - default="nodefault" - basedir="."> +<project + name="Build Utility Tasks" + default="nodefault" + basedir="."> - <property name="debugOptimization" value="false" /> + <property + name="debugOptimization" + value="false" /> <!-- ================================================================================== --> @@ -17,8 +20,9 @@ <!-- --> <!-- ================================================================================== --> - <target name="unpackUpdateJarsAndCreateZippedPackages" - depends="init"> + <target + name="unpackUpdateJarsAndCreateZippedPackages" + depends="init"> <!--Note: we use this odd "tmpsite-archiveName-temp" to make sure unique directories, @@ -31,8 +35,9 @@ is turnned on, then all the tmpsite directories are left on disk for inspection. --> - <property name="tmpsite" - value="${buildDirectory}/tmpsite-${archiveName}-temp" /> + <property + name="tmpsite" + value="${buildDirectory}/tmpsite-${archiveName}-temp" /> <!-- ================================================================================== --> <!-- --> @@ -53,20 +58,22 @@ <!-- --> <!-- ================================================================================== --> <echo message="normalize jars" /> - <java jar="${pde.builder.path}/startup.jar" - fork="true" - jvm="${java15-home}/bin/java" - failonerror="true" - maxmemory="256m" - dir="${buildDirectory}"> + <java + jar="${pde.builder.path}/startup.jar" + fork="true" + jvm="${java15-home}/bin/java" + failonerror="true" + maxmemory="256m" + dir="${buildDirectory}"> <arg line="${logIfDebug}" /> <arg line="-application org.eclipse.update.core.siteOptimizer" /> <!-- note: this -processAll option is critical in this first step. - For various reasons, jarProcessor is written to not act on - any jar if the jar is not "marked", or if not told explicitly to - to processAll + For various reasons, jarProcessor is written to not act on + any jar if the jar is not "marked", or if not told explicitly to + to processAll --> - <arg line="-jarProcessor ${verboseIfDebug} -processAll -outputDir ${tmpsite}/normalized -repack ${buildDirectory}/${buildLabel}/${archiveName}" /> + <arg + line="-jarProcessor ${verboseIfDebug} -processAll -outputDir ${tmpsite}/normalized -repack ${buildDirectory}/${buildLabel}/${archiveName}" /> </java> @@ -77,9 +84,10 @@ <!-- end up in {tmpsite}/eclipse --> <!-- --> <!-- ================================================================================== --> - <echo message="unzip normalized update jars to a holding place" /> - <unzip dest="${tmpsite}" - src="${tmpsite}/normalized/${archiveName}" /> + <echo message="unzip normalized update jars to a holding place" /> + <unzip + dest="${tmpsite}" + src="${tmpsite}/normalized/${archiveName}" /> <!-- ================================================================================== --> @@ -91,8 +99,9 @@ <!-- --> <!-- ================================================================================== --> <mkdir dir="${buildDirectory}/${buildLabel}/updateSite" /> - <copy todir="${buildDirectory}/${buildLabel}/updateSite" - overwrite="false"> + <copy + todir="${buildDirectory}/${buildLabel}/updateSite" + overwrite="false"> <fileset dir="${tmpsite}/eclipse" /> </copy> @@ -124,14 +133,15 @@ <!-- ================================================================================== --> <!-- use releng task of unpackUpdateJars --> - <unpackUpdateJars site="${tmpsite}/eclipse" - output="${tmpsite}/unpacked/eclipse" /> + <unpackUpdateJars + site="${tmpsite}/eclipse" + output="${tmpsite}/unpacked/eclipse" /> <!-- add copy of legal doc's here, product.ini, etc., before re-zipping --> - <copy todir="${tmpsite}/unpacked/eclipse" - overwrite="false"> - <fileset dir="${wtp.builder.home}/rootfiles"> - </fileset> + <copy + todir="${tmpsite}/unpacked/eclipse" + overwrite="false"> + <fileset dir="${wtp.builder.home}/rootfiles"></fileset> </copy> @@ -141,11 +151,12 @@ <!-- recreate zip file now, same name, traditional content, which is mix of folders and jars --> - <zip destfile="${buildDirectory}/${buildLabel}/${archiveName}" - basedir="${tmpsite}/unpacked" - update="false" - duplicate="preserve" /> - + <zip + destfile="${buildDirectory}/${buildLabel}/${archiveName}" + basedir="${tmpsite}/unpacked" + update="false" + duplicate="preserve" /> + <!-- always produce checksum files for any zips produced --> <antcall target="createChecksums" /> @@ -169,47 +180,60 @@ <target name="init"> - <condition property="verboseIfDebug" - value="-verbose" - else=""> + <condition + property="verboseIfDebug" + value="-verbose" + else=""> <istrue value="${debugOptimization}" /> </condition> - <condition property="logIfDebug" - value="-debug -consolelog" - else=""> + <condition + property="logIfDebug" + value="-debug -consolelog" + else=""> <istrue value="${debugOptimization}" /> </condition> - <condition property="keepIfDebug" - value="true"> + <condition + property="keepIfDebug" + value="true"> <istrue value="${debugOptimization}" /> </condition> </target> - <target name="deleteTmpSite" unless="keepIfDebug"> + <target + name="deleteTmpSite" + unless="keepIfDebug"> <delete dir="${tmpsite}" /> </target> - <target name="createPackFilesIfDesired" if="doPack" depends="init"> - <java jar="${pde.builder.path}/startup.jar" - fork="true" - jvm="${java15-home}/bin/java" - failonerror="true" - maxmemory="256m" - dir="${buildDirectory}"> + <target + name="createPackFilesIfDesired" + if="doPack" + depends="init"> + <java + jar="${pde.builder.path}/startup.jar" + fork="true" + jvm="${java15-home}/bin/java" + failonerror="true" + maxmemory="256m" + dir="${buildDirectory}"> <arg line="${logIfDebug}" /> <arg line="-application org.eclipse.update.core.siteOptimizer" /> - <arg line="-jarProcessor ${verboseIfDebug} -outputDir ${buildDirectory}/${buildLabel}/updateSite -pack ${buildDirectory}/${buildLabel}/updateSite" /> + <arg + line="-jarProcessor ${verboseIfDebug} -outputDir ${buildDirectory}/${buildLabel}/updateSite -pack ${buildDirectory}/${buildLabel}/updateSite" /> </java> </target> - <target name="makeBackupCopyForDebugging" if="keepIfDebug"> + <target + name="makeBackupCopyForDebugging" + if="keepIfDebug"> <!-- temporary copy while confirming build to be able to do side-by-side comparisons --> <mkdir dir="${buildDirectory}/backuporiginalzips" /> - <copy file="${buildDirectory}/${buildLabel}/${archiveName}" - todir="${buildDirectory}/backuporiginalzips" /> + <copy + file="${buildDirectory}/${buildLabel}/${archiveName}" + todir="${buildDirectory}/backuporiginalzips" /> </target> @@ -223,18 +247,22 @@ an md5antformat extension, that has only the checksum. --> <mkdir dir="${buildDirectory}/${buildLabel}/checksum" /> - <checksum file="${buildDirectory}/${buildLabel}/${archiveName}" - property="md5" /> - <echo message="${md5} *${archiveName}" - file="${buildDirectory}/${buildLabel}/checksum/${archiveName}.md5" /> - <echo message="${md5}" - file="${buildDirectory}/${buildLabel}/checksum/${archiveName}.md5antformat" /> + <checksum + file="${buildDirectory}/${buildLabel}/${archiveName}" + property="md5" /> + <echo + message="${md5} *${archiveName}" + file="${buildDirectory}/${buildLabel}/checksum/${archiveName}.md5" /> + <echo + message="${md5}" + file="${buildDirectory}/${buildLabel}/checksum/${archiveName}.md5antformat" /> </target> <target name="nodefault"> - <echo message="There is no default target for this buildutililites.xml ant script." /> + <echo + message="There is no default target for this buildutililites.xml ant script." /> </target> </project> diff --git a/releng.wtpbuilder/scripts/build/label.xml b/releng.wtpbuilder/scripts/build/label.xml index a020a904931f70175b92663988faf85fc71caa65..a66c63e01f81b85988176bb75304ef029508ebcb 100644 --- a/releng.wtpbuilder/scripts/build/label.xml +++ b/releng.wtpbuilder/scripts/build/label.xml @@ -1,57 +1,95 @@ -<project default="label" basedir="."> +<project + default="label" + basedir="."> - <!-- Load environment variables --> - <property environment="env"/> + <!-- 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" /> <!-- Capture the computer name in a cross-platform manner --> - <property name="env.COMPUTERNAME" value="${env.HOSTNAME}"/> + <property + name="env.COMPUTERNAME" + value="${env.HOSTNAME}" /> - <target name="label"> - <available file="${buildDirectory}/label.properties" property="label.properties.exists"/> - <antcall target="create.label.properties"/> + <target name="label"> + <available + file="${buildDirectory}/label.properties" + property="label.properties.exists" /> + <antcall target="create.label.properties" /> </target> - <target name="create.label.properties" unless="label.properties.exists"> - <mkdir dir="${buildDirectory}" /> - <tstamp> - <format property="date" pattern="yyyyMMdd" timezone="UTC"/> - </tstamp> - <tstamp> - <format property="time" pattern="HHmm" timezone="UTC"/> - </tstamp> - <property name="timestamp" value="${date}${time}" /> - <property name="buildType" value="I" /> - <property name="buildId" value="${buildType}${timestamp}" /> - - <!--this naming convention used by php scripts on download server--> - <property name="buildLabel" value="${buildType}-${buildId}-${timestamp}" /> - - <!--store the build label information in a file--> - <echo file="${buildDirectory}/label.properties" append="true" > - buildType=${buildType} - </echo> - <echo file="${buildDirectory}/label.properties" append="true" > - buildId=${buildId} - </echo> - <echo file="${buildDirectory}/label.properties" append="true" > - timestamp=${timestamp} - </echo> - <echo file="${buildDirectory}/label.properties" append="true" > - buildLabel=${buildLabel} - </echo> - <echo file="${buildDirectory}/label.properties" append="true" > - date=${date} - </echo> - <echo file="${buildDirectory}/label.properties" append="true" > - time=${time} - </echo> - - - <echo file="${buildDirectory}/buildmachineinfo.properties" append="true"> - buildComputer="${env.COMPUTERNAME}" - buildOS="${env.OS}" - </echo> + <target + name="create.label.properties" + unless="label.properties.exists"> + <mkdir dir="${buildDirectory}" /> + <tstamp> + <format + property="date" + pattern="yyyyMMdd" + timezone="UTC" /> + </tstamp> + <tstamp> + <format + property="time" + pattern="HHmm" + timezone="UTC" /> + </tstamp> + <property + name="timestamp" + value="${date}${time}" /> + <property + name="buildType" + value="I" /> + <property + name="buildId" + value="${buildType}${timestamp}" /> + + <!--this naming convention used by php scripts on download server--> + <property + name="buildLabel" + value="${buildType}-${buildId}-${timestamp}" /> + + <!--store the build label information in a file--> + <echo + file="${buildDirectory}/label.properties" + append="true"> + buildType=${buildType} + </echo> + <echo + file="${buildDirectory}/label.properties" + append="true"> + buildId=${buildId} + </echo> + <echo + file="${buildDirectory}/label.properties" + append="true"> + timestamp=${timestamp} + </echo> + <echo + file="${buildDirectory}/label.properties" + append="true"> + buildLabel=${buildLabel} + </echo> + <echo + file="${buildDirectory}/label.properties" + append="true"> + date=${date} + </echo> + <echo + file="${buildDirectory}/label.properties" + append="true"> + time=${time} + </echo> + + + <echo + file="${buildDirectory}/buildmachineinfo.properties" + append="true"> + buildComputer="${env.COMPUTERNAME}" buildOS="${env.OS}" + </echo> </target>