blob: ce66c083833d1327b2cb080383b4b75ad177cadf [file] [log] [blame]
david_williamsb7db8ba2007-02-19 01:54:04 +00001<project name="Build specific targets and properties" default="build" basedir=".">
david_williams42f9b242006-11-27 18:45:14 +00002
3 <!-- Note to be cross-platform, "environment variables" are only appropriate for
4 some variables, e.g. ones we set, since properties are case sensitive, even if
5 the environment variables on your operating system are not, e.g. it will
6 be ${env.Path} not ${env.PATH} on Windows -->
7 <property environment="env" />
david_williams6252b612007-02-25 07:23:43 +00008 <!--
9 Let users override standard properties, if desired.
10 If directory, file, or some properties do not exist,
11 then standard properties will be used.
12 -->
13 <property file="${env.LOCAL_BUILD_PROPERTIES_DIR}/${ant.project.name}.properties" />
david_williams42f9b242006-11-27 18:45:14 +000014
david_williams6252b612007-02-25 07:23:43 +000015 <!-- load standard properties for production environment -->
16 <property file="${env.STANDARD_PROPERTIES_DIR}/${ant.project.name}.properties" />
17 <!-- = = = end standard properties pattern = = = -->
david_williams42f9b242006-11-27 18:45:14 +000018
david_williams6252b612007-02-25 07:23:43 +000019 <echo message="ant.file: ${ant.file}"/>
david_williams2a01c5a2005-11-07 14:27:16 +000020 <target name="build">
david_williams54315a72007-02-14 22:50:44 +000021 <java jar="${eclipse.launcher}" fork="true" failonerror="true">
david_williams6252b612007-02-25 07:23:43 +000022 <jvmarg value="-Dosgi.clean=true" />
david_williams42f9b242006-11-27 18:45:14 +000023 <jvmarg value="-Dosgi.ws=${env.BASEWS}" />
24 <jvmarg value="-Dosgi.os=${env.BASEOS}" />
25 <jvmarg value="-Dosgi.arch=${env.BASEARCH}" />
david_williams2a01c5a2005-11-07 14:27:16 +000026 <jvmarg value="-Dbuild.trial=${build.trial}" />
ndai7383e5c2006-07-08 21:08:01 +000027 <jvmarg value="-DbuildBranch=${buildBranch}" />
ndaidab24cb2006-07-28 15:22:38 +000028 <jvmarg value="-Dbuild.pack-all-in-one=${build.pack-all-in-one}" />
david_williams2a01c5a2005-11-07 14:27:16 +000029 <jvmarg value="-DbuildType=${buildType}" />
30 <jvmarg value="-DbuildId=${buildId}" />
31 <jvmarg value="-DjavacDebugInfo=on" />
32 <jvmarg value="-DmapVersionTag=${mapVersionTag}" />
33 <jvmarg value="-Dbuild.distribution=${build.distribution}" />
34 <jvmarg value="-DbuildDirectory=${buildDirectory}" />
35 <jvmarg value="-Dwtp.builder.home=${wtp.builder.home}" />
david_williamsb7db8ba2007-02-19 01:54:04 +000036 <arg value="-data" />
37 <arg value="${basedir}/workspace" />
david_williams2a01c5a2005-11-07 14:27:16 +000038 <arg value="-application" />
39 <arg value="org.eclipse.ant.core.antRunner" />
40 <arg value="-buildfile" />
41 <arg value="${ant.file}" />
42 <arg value="publish" />
43 </java>
44 </target>
ndaib8cedc82005-09-13 18:00:32 +000045
david_williams2a01c5a2005-11-07 14:27:16 +000046 <!-- ===================================================================== -->
47 <!-- Steps to do to publish the build results -->
48 <!-- ===================================================================== -->
49 <target name="publish">
50 <dirname file="${ant.file}" property="component.dir" />
51 <ant antfile="${wtp.builder.home}/scripts/build/label.xml" />
52 <property file="${buildDirectory}/label.properties" />
ndaib8cedc82005-09-13 18:00:32 +000053
david_williams2a01c5a2005-11-07 14:27:16 +000054 <property name="publish.xml" value="${component.dir}/publish.xml" />
ndaib8cedc82005-09-13 18:00:32 +000055
david_williams2a01c5a2005-11-07 14:27:16 +000056 <property name="indexFileName" value="index.php" />
57 <property name="result" value="${buildDirectory}/${buildLabel}" />
58 <property name="indexTemplateFilename" value="index.html.template" />
ndaib8cedc82005-09-13 18:00:32 +000059
david_williams2a01c5a2005-11-07 14:27:16 +000060 <condition property="isBuildTested" value="true">
david_williamsf5f131a2007-03-17 06:12:13 +000061 <available file="${buildDirectory}/${buildLabel}/testResults/html" />
david_williams2a01c5a2005-11-07 14:27:16 +000062 </condition>
ndaib8cedc82005-09-13 18:00:32 +000063
david_williams2a01c5a2005-11-07 14:27:16 +000064 <ant antfile="${publish.xml}" dir="${component.dir}">
david_williamsd913e922006-11-13 07:24:21 +000065 <property name="dropTokenList" value="%wtpruntime%,%wtpsdk%,%wst%,%wst-sdk%,%wst-tests%,%jst-tests%,%wst-perf-tests%,%jst-perf-tests%,%jsf-runtime%,%jsf-sdk%,%jsf-tests%,%jpa-runtime%,%jpa-sdk%,%jpa-tests%" />
david_williams2a01c5a2005-11-07 14:27:16 +000066 <property name="webtoolsDownloadURL" value="http://www.eclipse.org/downloads/download.php?file=/webtools/committers/drops"/>
ndaie4d89b22005-09-14 18:15:14 +000067
ndai837c7ae2006-07-08 16:41:44 +000068 <property name="buildBranch" value="${buildBranch}" />
david_williams42f9b242006-11-27 18:45:14 +000069 <property name="build.pack-all-in-one" value="${build.pack-all-in-one}"/>
ndaidab24cb2006-07-28 15:22:38 +000070
david_williams2a01c5a2005-11-07 14:27:16 +000071 <property name="isBuildTested" value="${isBuildTested}" />
72 <property name="indexTemplateFilename" value="${indexTemplateFilename}" />
73 </ant>
ndaib8cedc82005-09-13 18:00:32 +000074
david_williams2a01c5a2005-11-07 14:27:16 +000075 <!-- Get the build map over for the results to point to. -->
76 <copy file="${buildDirectory}/directory.txt" tofile="${result}/directory.txt" />
ndaib8cedc82005-09-13 18:00:32 +000077
david_williams2a01c5a2005-11-07 14:27:16 +000078 <!-- Copy info for build identification -->
79 <copy file="${buildDirectory}/buildmachineinfo.properties" tofile="${result}/buildmachineinfo.properties" />
80
81 </target>
ndaib8cedc82005-09-13 18:00:32 +000082
83
84</project>