blob: c904acda7ff83d831e4338e4badaa24b42acb00a [file] [log] [blame]
david_williams8f37c5e2007-10-01 01:05:18 +00001<project
2 name="Build specific targets and properties"
3 default="build"
4 basedir=".">
david_williams42f9b242006-11-27 18:45:14 +00005
6 <!-- Note to be cross-platform, "environment variables" are only appropriate for
7 some variables, e.g. ones we set, since properties are case sensitive, even if
8 the environment variables on your operating system are not, e.g. it will
9 be ${env.Path} not ${env.PATH} on Windows -->
10 <property environment="env" />
david_williams6252b612007-02-25 07:23:43 +000011 <!--
david_williams8f37c5e2007-10-01 01:05:18 +000012 Let users override standard properties, if desired.
13 If directory, file, or some properties do not exist,
14 then standard properties will be used.
15 -->
16 <property
17 file="${env.LOCAL_BUILD_PROPERTIES_DIR}/${ant.project.name}.properties" />
david_williams42f9b242006-11-27 18:45:14 +000018
david_williams8f37c5e2007-10-01 01:05:18 +000019 <!-- load standard properties for production environment -->
20 <property
21 file="${env.STANDARD_PROPERTIES_DIR}/${ant.project.name}.properties" />
22 <!-- = = = end standard properties pattern = = = -->
david_williams42f9b242006-11-27 18:45:14 +000023
david_williams8f37c5e2007-10-01 01:05:18 +000024 <echo message="ant.file: ${ant.file}" />
david_williams2a01c5a2005-11-07 14:27:16 +000025 <target name="build">
david_williams8f37c5e2007-10-01 01:05:18 +000026 <java
27 jar="${eclipse.launcher}"
28 fork="true"
29 failonerror="true">
david_williams6252b612007-02-25 07:23:43 +000030 <jvmarg value="-Dosgi.clean=true" />
david_williams42f9b242006-11-27 18:45:14 +000031 <jvmarg value="-Dosgi.ws=${env.BASEWS}" />
32 <jvmarg value="-Dosgi.os=${env.BASEOS}" />
33 <jvmarg value="-Dosgi.arch=${env.BASEARCH}" />
david_williams2a01c5a2005-11-07 14:27:16 +000034 <jvmarg value="-Dbuild.trial=${build.trial}" />
ndai7383e5c2006-07-08 21:08:01 +000035 <jvmarg value="-DbuildBranch=${buildBranch}" />
david_williams8f37c5e2007-10-01 01:05:18 +000036 <jvmarg
37 value="-Dbuild.pack-all-in-one=${build.pack-all-in-one}" />
david_williams2a01c5a2005-11-07 14:27:16 +000038 <jvmarg value="-DbuildType=${buildType}" />
39 <jvmarg value="-DbuildId=${buildId}" />
40 <jvmarg value="-DjavacDebugInfo=on" />
41 <jvmarg value="-DmapVersionTag=${mapVersionTag}" />
42 <jvmarg value="-Dbuild.distribution=${build.distribution}" />
43 <jvmarg value="-DbuildDirectory=${buildDirectory}" />
44 <jvmarg value="-Dwtp.builder.home=${wtp.builder.home}" />
david_williamsb7db8ba2007-02-19 01:54:04 +000045 <arg value="-data" />
46 <arg value="${basedir}/workspace" />
david_williams2a01c5a2005-11-07 14:27:16 +000047 <arg value="-application" />
48 <arg value="org.eclipse.ant.core.antRunner" />
49 <arg value="-buildfile" />
50 <arg value="${ant.file}" />
51 <arg value="publish" />
52 </java>
53 </target>
ndaib8cedc82005-09-13 18:00:32 +000054
david_williams2a01c5a2005-11-07 14:27:16 +000055 <!-- ===================================================================== -->
56 <!-- Steps to do to publish the build results -->
57 <!-- ===================================================================== -->
58 <target name="publish">
david_williams8f37c5e2007-10-01 01:05:18 +000059 <dirname
60 file="${ant.file}"
61 property="component.dir" />
david_williams2a01c5a2005-11-07 14:27:16 +000062 <ant antfile="${wtp.builder.home}/scripts/build/label.xml" />
63 <property file="${buildDirectory}/label.properties" />
ndaib8cedc82005-09-13 18:00:32 +000064
david_williams8f37c5e2007-10-01 01:05:18 +000065 <property
66 name="publish.xml"
67 value="${component.dir}/publish.xml" />
ndaib8cedc82005-09-13 18:00:32 +000068
david_williams8f37c5e2007-10-01 01:05:18 +000069 <property
70 name="indexFileName"
71 value="index.php" />
72 <property
73 name="result"
74 value="${buildDirectory}/${buildLabel}" />
75 <property
76 name="indexTemplateFilename"
77 value="index.html.template.php" />
78
79 <copy
80 file="${wtp.builder.home}/distribution/wtp.site/templateFiles/${indexTemplateFilename}"
81 tofile="${buildDirectory}/${indexFileName}" />
82
83 <condition
84 property="isBuildTested"
85 value="true">
86 <available
87 file="${buildDirectory}/${buildLabel}/testResults/html" />
david_williams2a01c5a2005-11-07 14:27:16 +000088 </condition>
ndaib8cedc82005-09-13 18:00:32 +000089
david_williams8f37c5e2007-10-01 01:05:18 +000090 <ant
91 antfile="${publish.xml}"
92 dir="${component.dir}">
93 <property
94 name="dropTokenList"
95 value="%wtpruntime%,%wtpsdk%,%wtptest%,%wst%,%wst-sdk%,%wst-tests%,%jst-tests%,%wst-perf-tests%,%jst-perf-tests%,%jpt-runtime%,%jpt-sdk%,%jpt-tests%" />
96 <property
97 name="webtoolsDownloadURL"
98 value="http://www.eclipse.org/downloads/download.php?file=/webtools/committers/drops" />
ndaie4d89b22005-09-14 18:15:14 +000099
david_williams8f37c5e2007-10-01 01:05:18 +0000100 <property
101 name="buildBranch"
102 value="${buildBranch}" />
103 <property
104 name="build.pack-all-in-one"
105 value="${build.pack-all-in-one}" />
ndaidab24cb2006-07-28 15:22:38 +0000106
david_williams8f37c5e2007-10-01 01:05:18 +0000107 <property
108 name="isBuildTested"
109 value="${isBuildTested}" />
110 <property
111 name="indexTemplateFilename"
112 value="${indexTemplateFilename}" />
david_williams2a01c5a2005-11-07 14:27:16 +0000113 </ant>
ndaib8cedc82005-09-13 18:00:32 +0000114
david_williams2a01c5a2005-11-07 14:27:16 +0000115 <!-- Get the build map over for the results to point to. -->
david_williams8f37c5e2007-10-01 01:05:18 +0000116 <copy
117 file="${buildDirectory}/directory.txt"
118 tofile="${result}/directory.txt" />
ndaib8cedc82005-09-13 18:00:32 +0000119
david_williams2a01c5a2005-11-07 14:27:16 +0000120 <!-- Copy info for build identification -->
david_williams8f37c5e2007-10-01 01:05:18 +0000121 <copy
122 file="${buildDirectory}/buildmachineinfo.properties"
123 tofile="${result}/buildmachineinfo.properties" />
david_williams2a01c5a2005-11-07 14:27:16 +0000124
david_williams8f37c5e2007-10-01 01:05:18 +0000125 <!-- final count files -->
126 <countBuildFiles
127 sourceDirectory="${buildDirectory}/${buildLabel}"
128 filterString=".zip,.tar.gz"
129 outputFile="${buildDirectory}/${buildLabel}/files.count" />
130
david_williams2a01c5a2005-11-07 14:27:16 +0000131 </target>
ndaib8cedc82005-09-13 18:00:32 +0000132
133
134</project>