blob: 720cbb54f518b6da19bc351fe1e4c5c02edb9a07 [file] [log] [blame]
david_williams4b8ab0d2008-01-08 03:56:56 +00001<project
2 name="PDECustomTargets"
3 default="noDefault"
4 basedir=".">
5
david_williams28df8fd2008-07-01 06:25:59 +00006 <!-- = = = standard properties pattern = = =
david_williams4b8ab0d2008-01-08 03:56:56 +00007
david_williams4b8ab0d2008-01-08 03:56:56 +00008 Note to be cross-platform, "environment variables" are only appropriate for
9 some variables, e.g. ones we set, since properties are case sensitive, even if
10 the environment variables on your operating system are not, e.g. it will
11 be ${env.Path} not ${env.PATH} on Windows -->
david_williams28df8fd2008-07-01 06:25:59 +000012 <property environment="env" />
david_williams4b8ab0d2008-01-08 03:56:56 +000013
14 <!--
15 Let users override standard properties, if desired.
16 If directory, file, or some properties do not exist,
17 then standard properties will be used.
18 -->
david_williams28df8fd2008-07-01 06:25:59 +000019 <property
20 file="${env.LOCAL_BUILD_PROPERTIES_DIR}/${ant.project.name}.properties" />
david_williams4b8ab0d2008-01-08 03:56:56 +000021
22 <!-- let this project specify properties, if not already set -->
david_williams28df8fd2008-07-01 06:25:59 +000023 <property file="build.properties" />
24
25 <fail
26 unless="buildDirectory"
27 message="buildDirectory must be set" />
28 <echo message="buildDirectory: ${buildDirectory}" />
29
30 <property
31 name="cvsProtocol"
32 value="${env.BUILD_CVS_WRITE_PROTOCOL}" />
33 <property
34 name="cvsUser"
35 value="${env.BUILD_CVS_WRITE_USER}" />
36 <property
37 name="cvsServer"
38 value="${env.BUILD_CVS_SERVER}" />
39 <property
40 name="cvsRoot"
41 value="${env.BUILD_CVS_ROOT}" />
42
43 <!--
44 Run a given ${target} on all elements being built
45 Add on <ant> task for each top level element being built.
46 -->
47 <target name="allElements">
david_williams4b8ab0d2008-01-08 03:56:56 +000048 <echo
49 level="info"
50 message="Target:${target} " />
51 <echo
52 level="debug"
53 message="basedir: ${basedir}" />
54 <echo
david_williams28df8fd2008-07-01 06:25:59 +000055 level="info"
david_williams4b8ab0d2008-01-08 03:56:56 +000056 message="component: ${component}" />
57 <echo
58 level="debug"
59 message="buildDirectory: ${buildDirectory}" />
60 <echo
61 level="debug"
62 message="baseLocation: ${baseLocation}" />
david_williams28df8fd2008-07-01 06:25:59 +000063 <echo
64 level="debug"
65 message="generic target: ${genericTargets}" />
66 <echo
67 message="compilerArg: ${compilerArg}" />
68 <echo
69 message="individualSourceBundles: ${individualSourceBundles}" />
david_williams4b8ab0d2008-01-08 03:56:56 +000070 <ant
71 antfile="${genericTargets}"
72 target="${target}">
73 <property
74 name="type"
75 value="feature" />
76 <property
77 name="id"
78 value="org.eclipse.wst.xsl_tests.feature" />
79 </ant>
80 </target>
81
david_williams28df8fd2008-07-01 06:25:59 +000082 <!--
83 Targets to assemble the built elements for particular configurations
84 These generally call the generated assemble scripts (named in
85 ${assembleScriptName}) but may also add pre and post processing
86 Add one target for each root element and each configuration
87 -->
88
89 <target name="assemble.org.eclipse.wst.xsl_tests.feature">
david_williams4b8ab0d2008-01-08 03:56:56 +000090 <property
91 name="archiveName"
david_williams28df8fd2008-07-01 06:25:59 +000092 value="wtp-xsl-Automated-Tests-${buildLabel}.zip" />
david_williams4b8ab0d2008-01-08 03:56:56 +000093 <ant
94 antfile="${assembleScriptName}"
95 dir="${buildDirectory}" />
david_williams28df8fd2008-07-01 06:25:59 +000096
david_williams4b8ab0d2008-01-08 03:56:56 +000097 </target>
david_williams28df8fd2008-07-01 06:25:59 +000098
99 <target name="prePackage" />
100
101
102 <target name="postPackage">
103
david_williams4b8ab0d2008-01-08 03:56:56 +0000104 <property
105 name="archiveName"
david_williams28df8fd2008-07-01 06:25:59 +0000106 value="wtp-xsl-Automated-Tests-${buildLabel}.zip" />
107
david_williams4b8ab0d2008-01-08 03:56:56 +0000108 <ant
109 antfile="${wtp.builder.home}/scripts/build/buildutilities.xml"
110 target="unpackUpdateJarsAndCreateZippedPackages">
david_williams28df8fd2008-07-01 06:25:59 +0000111 <property
112 name="buildDirectory"
113 value="${buildDirectory}" />
114 <property
115 name="buildLabel"
116 value="${buildLabel}" />
117 <property
118 name="archiveName"
119 value="${archiveName}" />
david_williams4b8ab0d2008-01-08 03:56:56 +0000120 </ant>
david_williams28df8fd2008-07-01 06:25:59 +0000121
david_williams4b8ab0d2008-01-08 03:56:56 +0000122 </target>
123
david_williams28df8fd2008-07-01 06:25:59 +0000124 <!--
125 Check out map files from repository
126 -->
127 <target name="getMapFiles">
david_williams4b8ab0d2008-01-08 03:56:56 +0000128
david_williamsd15372c2008-07-03 06:57:55 +0000129 <ant
130 antfile="${wtp.builder.home}/scripts/build/maptasks.xml"
131 target="maputil">
132 <property
133 name="mapcomponent"
134 value="${env.RELENGINCUBATOR}"/>
135 <property
136 name="mapTag"
137 value="${mapVersionTag}"/>
138 </ant>
david_williams4b8ab0d2008-01-08 03:56:56 +0000139
david_williams4b8ab0d2008-01-08 03:56:56 +0000140 </target>
141
142
david_williams28df8fd2008-07-01 06:25:59 +0000143 <!--
144 Steps to do before setup
145 -->
146 <target name="preSetup"></target>
david_williams4b8ab0d2008-01-08 03:56:56 +0000147
david_williams28df8fd2008-07-01 06:25:59 +0000148 <!--
149 Steps to do after setup but before starting the build proper
150 -->
151 <target name="postSetup">
david_williams4b8ab0d2008-01-08 03:56:56 +0000152 <dirname
153 file="${ant.file}"
154 property="component.dir" />
155 <echo
156 level="debug"
157 message="ant.file: ${ant.file}" />
158 <echo
159 level="debug"
160 message="component.dir: ${component.dir}" />
david_williams28df8fd2008-07-01 06:25:59 +0000161
david_williams4b8ab0d2008-01-08 03:56:56 +0000162 <ant
163 antfile="${component.dir}/dependency.xml"
164 target="get">
165 <property
166 name="dependency.properties"
167 value="${buildDirectory}/maps/${env.RELENG}/maps/dependencies.properties" />
168 <property
169 name="base.install.dir"
170 value="${buildRoot}" />
171 </ant>
david_williams28df8fd2008-07-01 06:25:59 +0000172
david_williams4b8ab0d2008-01-08 03:56:56 +0000173 </target>
174
david_williams28df8fd2008-07-01 06:25:59 +0000175 <!--
176 Steps to do before fetching the build elements
177 -->
178 <target name="preFetch"></target>
david_williams4b8ab0d2008-01-08 03:56:56 +0000179
david_williams28df8fd2008-07-01 06:25:59 +0000180 <!--
181 Steps to do after fetching the build elements
182 -->
183 <target name="postFetch"></target>
david_williams4b8ab0d2008-01-08 03:56:56 +0000184
david_williams28df8fd2008-07-01 06:25:59 +0000185 <!--
186 Steps to do before generating the build scripts.
187 -->
188 <target name="preGenerate"></target>
189
190 <!--
191 Steps to do after generating the build scripts.
192 -->
193 <target name="postGenerate">
194 <echo message="buildDirectory: ${buildDirectory}" />
david_williams4b8ab0d2008-01-08 03:56:56 +0000195 <customizeAccessRules
david_williams28df8fd2008-07-01 06:25:59 +0000196 bundleDirectory="${buildDirectory}/plugins"/>
david_williams4b8ab0d2008-01-08 03:56:56 +0000197 </target>
david_williams4b8ab0d2008-01-08 03:56:56 +0000198
199
david_williams4b8ab0d2008-01-08 03:56:56 +0000200
david_williams28df8fd2008-07-01 06:25:59 +0000201 <!--
202 Steps to do before running the build.xmls for the elements being built.
203 -->
204 <target name="preProcess">
205 <replace
206 dir="${buildDirectory}/plugins"
207 value="${timestamp}"
208 token="@build@">
209 <include name="**/about.mappings" />
210 </replace>
211 </target>
212
213 <!--
214 Steps to do after running the build.xmls for the elements being built.
215 -->
216 <target name="postProcess">
217 <condition property="logsAvailable">
218 <istrue value="${javacVerbose}" />
david_williams4b8ab0d2008-01-08 03:56:56 +0000219 </condition>
david_williams28df8fd2008-07-01 06:25:59 +0000220 <antcall target="gatherLogs" />
david_williams4b8ab0d2008-01-08 03:56:56 +0000221 </target>
222
223
david_williams28df8fd2008-07-01 06:25:59 +0000224 <!--
225 Steps to do before running assemble.
226 -->
227 <target name="preAssemble"></target>
david_williams4b8ab0d2008-01-08 03:56:56 +0000228
david_williams28df8fd2008-07-01 06:25:59 +0000229 <!--
230 Steps to do after running assemble.
231 -->
232 <target name="postAssemble"></target>
david_williams4b8ab0d2008-01-08 03:56:56 +0000233
david_williams28df8fd2008-07-01 06:25:59 +0000234 <!--
235 Steps to do after the build is done.
236 -->
237 <target name="postBuild"></target>
david_williams4b8ab0d2008-01-08 03:56:56 +0000238
david_williams28df8fd2008-07-01 06:25:59 +0000239 <!--
240 Steps to do to test the build results
241 -->
242 <target name="test"></target>
david_williams4b8ab0d2008-01-08 03:56:56 +0000243
david_williams28df8fd2008-07-01 06:25:59 +0000244 <!--
245 Steps to do to publish the build results
246 -->
247 <target name="publish"></target>
david_williams4b8ab0d2008-01-08 03:56:56 +0000248
david_williams28df8fd2008-07-01 06:25:59 +0000249 <!--
250 Helper targets
251 -->
david_williams4b8ab0d2008-01-08 03:56:56 +0000252 <target
253 name="gatherLogs"
254 if="logsAvailable">
david_williams28df8fd2008-07-01 06:25:59 +0000255 <mkdir dir="${buildDirectory}/${buildLabel}/testcompilelogs" />
david_williams4b8ab0d2008-01-08 03:56:56 +0000256 <echo
257 level="debug"
258 message="logExtension: ${logExtension}" />
david_williams28df8fd2008-07-01 06:25:59 +0000259 <antcall target="allElements">
david_williams4b8ab0d2008-01-08 03:56:56 +0000260 <param
261 name="target"
262 value="gatherLogs" />
263 <param
264 name="logExtension"
265 value="${logExtension}" />
266 </antcall>
267 <unzip
268 dest="${buildDirectory}/${buildLabel}/testcompilelogs"
269 overwrite="true">
270 <fileset
david_williams28df8fd2008-07-01 06:25:59 +0000271 dir="${buildDirectory}/features/org.eclipse.wst.xsl.tests">
272 <include name="**/*.log.zip" />
david_williams4b8ab0d2008-01-08 03:56:56 +0000273 </fileset>
274 </unzip>
david_williams28df8fd2008-07-01 06:25:59 +0000275
276
277
david_williams4b8ab0d2008-01-08 03:56:56 +0000278 </target>
david_williams28df8fd2008-07-01 06:25:59 +0000279
david_williams4b8ab0d2008-01-08 03:56:56 +0000280 <target
281 name="clean"
282 unless="noclean">
david_williams28df8fd2008-07-01 06:25:59 +0000283 <antcall target="allElements">
david_williams4b8ab0d2008-01-08 03:56:56 +0000284 <param
285 name="target"
286 value="cleanElement" />
287 </antcall>
288 </target>
david_williams28df8fd2008-07-01 06:25:59 +0000289
290 <!--
291 Default target
292 -->
293 <target name="noDefault">
david_williams4b8ab0d2008-01-08 03:56:56 +0000294 <echo
295 level="error"
296 message="You must specify a target when invoking this file" />
297 </target>
david_williams28df8fd2008-07-01 06:25:59 +0000298
299</project>