blob: 89d28dd5d97929675def09e657ce13add33fbe79 [file] [log] [blame]
david_williamsa3e48362007-08-22 04:21:50 +00001<project
david_williams26f83182007-12-09 06:56:43 +00002 name="PDECustomTargets"
3 default="noDefault"
4 basedir=".">
david_williams26f83182007-12-09 06:56:43 +00005 <property
david_williams33dbe502009-11-20 15:30:38 +00006 name="buildfeature"
david_williams5a741f72008-07-02 04:29:23 +00007 value="org.eclipse.wtp.patch.assembly.feature"/>
8 <!--
9 = = = standard properties pattern = = = Note to be
10 cross-platform, "environment variables" are only appropriate for
11 some variables, e.g. ones we set, since properties are case
12 sensitive, even if the environment variables on your operating
13 system are not, e.g. it will be ${env.Path} not ${env.PATH} on
14 Windows
15 -->
16 <property
17 environment="env"/>
18 <!--
19 Let users override standard properties, if desired. If
20 directory, file, or some properties do not exist, then standard
21 properties will be used.
22 -->
23 <property
24 file="${env.LOCAL_BUILD_PROPERTIES_DIR}/${ant.project.name}.properties"/>
david_williamsa3e48362007-08-22 04:21:50 +000025
david_williams5a741f72008-07-02 04:29:23 +000026 <!-- let this project specify properties, if not already set -->
27 <property
28 file="build.properties"/>
david_williams28df8fd2008-07-01 06:25:59 +000029 <fail
david_williams33dbe502009-11-20 15:30:38 +000030 message="dependency.properties must be specified by distribution script"
31 unless="dependency.properties"/>
32 <fail
david_williams28df8fd2008-07-01 06:25:59 +000033 unless="buildDirectory"
david_williams5a741f72008-07-02 04:29:23 +000034 message="buildDirectory must be set"/>
35 <echo
36 message="buildDirectory: ${buildDirectory}"/>
david_williams5a741f72008-07-02 04:29:23 +000037 <!--
38 Run a given ${target} on all elements being built Add on <ant>
39 task for each top level element being built.
david_williams28df8fd2008-07-01 06:25:59 +000040 -->
david_williams5a741f72008-07-02 04:29:23 +000041 <target
42 name="allElements">
david_williams403beae2007-12-09 02:10:40 +000043 <echo
44 level="info"
david_williams5a741f72008-07-02 04:29:23 +000045 message="Target:${target} "/>
david_williams403beae2007-12-09 02:10:40 +000046 <echo
47 level="debug"
david_williams5a741f72008-07-02 04:29:23 +000048 message="basedir: ${basedir}"/>
david_williams403beae2007-12-09 02:10:40 +000049 <echo
david_williams28df8fd2008-07-01 06:25:59 +000050 level="info"
david_williams5a741f72008-07-02 04:29:23 +000051 message="component: ${component}"/>
david_williams403beae2007-12-09 02:10:40 +000052 <echo
53 level="debug"
david_williams5a741f72008-07-02 04:29:23 +000054 message="buildDirectory: ${buildDirectory}"/>
david_williams403beae2007-12-09 02:10:40 +000055 <echo
56 level="debug"
david_williams5a741f72008-07-02 04:29:23 +000057 message="baseLocation: ${baseLocation}"/>
david_williams403beae2007-12-09 02:10:40 +000058 <echo
59 level="debug"
david_williams5a741f72008-07-02 04:29:23 +000060 message="patchFeature: ${patchFeature}"/>
61 <echo
62 message="compilerArg: ${compilerArg}"/>
63 <echo
64 message="individualSourceBundles: ${individualSourceBundles}"/>
david_williamsa3e48362007-08-22 04:21:50 +000065 <ant
66 antfile="${genericTargets}"
67 target="${target}">
68 <property
69 name="type"
david_williams5a741f72008-07-02 04:29:23 +000070 value="feature"/>
david_williamsa3e48362007-08-22 04:21:50 +000071 <property
72 name="id"
david_williams33dbe502009-11-20 15:30:38 +000073 value="${buildfeature}"/>
david_williamsa76816d2006-12-11 20:10:22 +000074 </ant>
75 </target>
david_williams5a741f72008-07-02 04:29:23 +000076 <!--
77 Targets to assemble the built elements for particular
78 configurations These generally call the generated assemble
79 scripts (named in ${assembleScriptName}) but may also add pre
80 and post processing Add one target for each root element and
81 each configuration
david_williams28df8fd2008-07-01 06:25:59 +000082 -->
david_williams5a741f72008-07-02 04:29:23 +000083 <target
84 name="assemble.org.eclipse.wtp.patch.assembly.feature">
david_williamsa3e48362007-08-22 04:21:50 +000085 <property
86 name="archiveName"
david_williams5a741f72008-07-02 04:29:23 +000087 value="wtp-${buildLabel}.zip"/>
david_williamsa3e48362007-08-22 04:21:50 +000088 <ant
89 antfile="${assembleScriptName}"
david_williams5a741f72008-07-02 04:29:23 +000090 dir="${buildDirectory}"/>
david_williamsa76816d2006-12-11 20:10:22 +000091 </target>
david_williams5a741f72008-07-02 04:29:23 +000092 <target
93 name="prePackage"/>
94 <target
95 name="postPackage">
david_williamsa3e48362007-08-22 04:21:50 +000096 <property
97 name="archiveName"
david_williams5a741f72008-07-02 04:29:23 +000098 value="wtp-${buildLabel}.zip"/>
david_williamsa3e48362007-08-22 04:21:50 +000099 <ant
100 antfile="${wtp.builder.home}/scripts/build/buildutilities.xml"
101 target="unpackUpdateJarsAndCreateZippedPackages">
102 <property
103 name="buildDirectory"
david_williams5a741f72008-07-02 04:29:23 +0000104 value="${buildDirectory}"/>
david_williamsa3e48362007-08-22 04:21:50 +0000105 <property
106 name="buildLabel"
david_williams5a741f72008-07-02 04:29:23 +0000107 value="${buildLabel}"/>
david_williamsa3e48362007-08-22 04:21:50 +0000108 <property
109 name="archiveName"
david_williams5a741f72008-07-02 04:29:23 +0000110 value="${archiveName}"/>
david_williamsa3e48362007-08-22 04:21:50 +0000111 </ant>
david_williamsa76816d2006-12-11 20:10:22 +0000112 </target>
113
david_williamsa3e48362007-08-22 04:21:50 +0000114
david_williams5a741f72008-07-02 04:29:23 +0000115 <!--
david_williams28df8fd2008-07-01 06:25:59 +0000116 Check out map files from repository
117 -->
david_williams5a741f72008-07-02 04:29:23 +0000118 <target
119 name="getMapFiles">
david_williamsa3e48362007-08-22 04:21:50 +0000120
david_williams5a741f72008-07-02 04:29:23 +0000121 <!-- fetch only those related to 155 patches -->
david_williams28df8fd2008-07-01 06:25:59 +0000122 <ant
123 antfile="${wtp.builder.home}/scripts/build/maptasks.xml"
david_williams5a741f72008-07-02 04:29:23 +0000124 target="maputil">
125 <property
126 name="mapcomponent"
127 value="${env.RELENG}"/>
128 <property
129 name="mapTag"
130 value="${mapVersionTag}"/>
131 </ant>
132 <ant
133 antfile="${wtp.builder.home}/scripts/build/maptasks.xml"
134 target="maputil">
135 <property
136 name="mapcomponent"
137 value="${env.RELENGCOMMON}"/>
138 <property
139 name="mapTag"
140 value="${mapVersionTag}"/>
141 </ant>
142 <ant
143 antfile="${wtp.builder.home}/scripts/build/maptasks.xml"
144 target="maputil">
145 <property
146 name="mapcomponent"
147 value="${env.RELENGSERVERTOOLS}"/>
148 <property
149 name="mapTag"
150 value="${mapVersionTag}"/>
151 </ant>
152 <ant
153 antfile="${wtp.builder.home}/scripts/build/maptasks.xml"
154 target="maputil">
155 <property
156 name="mapcomponent"
157 value="${env.RELENGSOURCEEDITING}"/>
158 <property
159 name="mapTag"
160 value="${mapVersionTag}"/>
161 </ant>
162 <ant
163 antfile="${wtp.builder.home}/scripts/build/maptasks.xml"
164 target="maputil">
165 <property
166 name="mapcomponent"
167 value="${env.RELENGWEBSERVICES}"/>
168 <property
169 name="mapTag"
170 value="${mapVersionTag}"/>
171 </ant>
172 <ant
173 antfile="${wtp.builder.home}/scripts/build/maptasks.xml"
174 target="maputil">
175 <property
176 name="mapcomponent"
177 value="${env.RELENGEJBTOOLS}"/>
178 <property
179 name="mapTag"
180 value="${mapVersionTag}"/>
181 </ant>
182 <ant
183 antfile="${wtp.builder.home}/scripts/build/maptasks.xml"
184 target="maputil">
185 <property
186 name="mapcomponent"
187 value="${env.RELENGJEETOOLS}"/>
188 <property
189 name="mapTag"
190 value="${mapVersionTag}"/>
191 </ant>
192 <ant
193 antfile="${wtp.builder.home}/scripts/build/maptasks.xml"
194 target="maputil">
195 <property
196 name="mapcomponent"
197 value="${env.RELENGDATATOOLS}"/>
198 <property
199 name="mapTag"
200 value="${mapVersionTag}"/>
201 </ant>
david_williamsa76816d2006-12-11 20:10:22 +0000202 </target>
203
204
david_williams5a741f72008-07-02 04:29:23 +0000205 <!--
david_williams28df8fd2008-07-01 06:25:59 +0000206 Steps to do before setup
207 -->
david_williams5a741f72008-07-02 04:29:23 +0000208 <target
209 name="preSetup">
210 </target>
david_williams28df8fd2008-07-01 06:25:59 +0000211 <!--
david_williams5a741f72008-07-02 04:29:23 +0000212 Steps to do after setup but before starting the build proper
david_williams28df8fd2008-07-01 06:25:59 +0000213 -->
david_williams5a741f72008-07-02 04:29:23 +0000214 <target
215 name="postSetup">
david_williamsa3e48362007-08-22 04:21:50 +0000216 <dirname
217 file="${ant.file}"
david_williams5a741f72008-07-02 04:29:23 +0000218 property="component.dir"/>
david_williams403beae2007-12-09 02:10:40 +0000219 <echo
220 level="debug"
david_williams5a741f72008-07-02 04:29:23 +0000221 message="ant.file: ${ant.file}"/>
david_williams403beae2007-12-09 02:10:40 +0000222 <echo
223 level="debug"
david_williams5a741f72008-07-02 04:29:23 +0000224 message="component.dir: ${component.dir}"/>
david_williams33dbe502009-11-20 15:30:38 +0000225
226 <!-- Get the dependencies -->
227 <antcall
228 target="getDependencies"/>
229 </target>
230 <!--
231 =====================================================================
232 -->
233 <!-- Get the dependencies based on releng maps -->
234 <!--
235 =====================================================================
236 -->
237 <target
238 name="getDependencies">
david_williamsa3e48362007-08-22 04:21:50 +0000239 <ant
240 antfile="${component.dir}/dependency.xml"
241 target="get">
242 <property
david_williamsa3e48362007-08-22 04:21:50 +0000243 name="base.install.dir"
david_williams5a741f72008-07-02 04:29:23 +0000244 value="${buildRoot}"/>
david_williamsa76816d2006-12-11 20:10:22 +0000245 </ant>
david_williamsa76816d2006-12-11 20:10:22 +0000246 </target>
247
david_williams5a741f72008-07-02 04:29:23 +0000248 <!--
david_williams28df8fd2008-07-01 06:25:59 +0000249 Steps to do before fetching the build elements
250 -->
david_williams5a741f72008-07-02 04:29:23 +0000251 <target
david_williams33dbe502009-11-20 15:30:38 +0000252 name="preFetch"></target>
david_williamsa76816d2006-12-11 20:10:22 +0000253
david_williams5a741f72008-07-02 04:29:23 +0000254 <!--
david_williams28df8fd2008-07-01 06:25:59 +0000255 Steps to do after fetching the build elements
256 -->
david_williams5a741f72008-07-02 04:29:23 +0000257 <target
david_williams33dbe502009-11-20 15:30:38 +0000258 name="postFetch"></target>
david_williamsa76816d2006-12-11 20:10:22 +0000259
david_williams5a741f72008-07-02 04:29:23 +0000260 <!--
david_williams28df8fd2008-07-01 06:25:59 +0000261 Steps to do before generating the build scripts.
262 -->
david_williams5a741f72008-07-02 04:29:23 +0000263 <target
david_williams33dbe502009-11-20 15:30:38 +0000264 name="preGenerate"></target>
david_williamsa76816d2006-12-11 20:10:22 +0000265
david_williams5a741f72008-07-02 04:29:23 +0000266 <!--
david_williams28df8fd2008-07-01 06:25:59 +0000267 Steps to do after generating the build scripts.
268 -->
david_williams5a741f72008-07-02 04:29:23 +0000269 <target
270 name="postGenerate">
271 </target>
272 <!--
273 Steps to do before running the build.xmls for the elements being
274 built.
david_williams28df8fd2008-07-01 06:25:59 +0000275 -->
david_williams5a741f72008-07-02 04:29:23 +0000276 <target
277 name="preProcess">
david_williamsa3e48362007-08-22 04:21:50 +0000278 <replace
279 dir="${buildDirectory}/plugins"
280 value="${timestamp}"
281 token="@build@">
david_williams5a741f72008-07-02 04:29:23 +0000282 <include
283 name="**/about.mappings"/>
david_williamsa76816d2006-12-11 20:10:22 +0000284 </replace>
285 </target>
david_williams28df8fd2008-07-01 06:25:59 +0000286 <!--
david_williams5a741f72008-07-02 04:29:23 +0000287 Steps to do after running the build.xmls for the elements being
288 built.
david_williams28df8fd2008-07-01 06:25:59 +0000289 -->
david_williams5a741f72008-07-02 04:29:23 +0000290 <target
291 name="postProcess">
292 <condition
293 property="logsAvailable">
294 <istrue
295 value="${javacVerbose}"/>
david_williamsa76816d2006-12-11 20:10:22 +0000296 </condition>
david_williams5a741f72008-07-02 04:29:23 +0000297 <antcall
298 target="gatherLogs"/>
david_williamsa76816d2006-12-11 20:10:22 +0000299 </target>
david_williams5a741f72008-07-02 04:29:23 +0000300 <!--
301 Steps to do before running assemble. Note: in version 2.0 (and
302 previous) we need to build the explorer war file by invoking
303 script. In 3.0 forward, we do not, so this simple existence
304 check allows us to use the same script for both streams
david_williams28df8fd2008-07-01 06:25:59 +0000305 -->
david_williams674e5502008-01-16 20:31:15 +0000306 <property
307 name="buildwarfilename"
david_williams5a741f72008-07-02 04:29:23 +0000308 value="${buildDirectory}/plugins/org.eclipse.wst.ws.explorer/build-war.xml"/>
david_williams674e5502008-01-16 20:31:15 +0000309 <target
310 name="preAssemble"
311 depends="buildwar">
312 </target>
david_williams5a741f72008-07-02 04:29:23 +0000313 <target
314 name="checkForBuildFile">
315 <condition
316 property="buildFileExists">
317 <available
318 file="${buildwarfilename}"/>
david_williams674e5502008-01-16 20:31:15 +0000319 </condition>
320 </target>
david_williams674e5502008-01-16 20:31:15 +0000321 <target
322 name="buildwar"
323 depends="checkForBuildFile"
324 if="buildFileExists">
david_williams5a741f72008-07-02 04:29:23 +0000325 <ant
326 antfile="${buildwarfilename}">
david_williams674e5502008-01-16 20:31:15 +0000327 <property
328 name="baseLocation"
david_williams5a741f72008-07-02 04:29:23 +0000329 value="${baseLocation}"/>
david_williams674e5502008-01-16 20:31:15 +0000330 <property
331 name="basedir"
david_williams5a741f72008-07-02 04:29:23 +0000332 value="${buildDirectory}/plugins/org.eclipse.wst.ws.explorer"/>
david_williams674e5502008-01-16 20:31:15 +0000333 <property
334 name="buildDirectory"
david_williams5a741f72008-07-02 04:29:23 +0000335 value="${buildDirectory}"/>
david_williams674e5502008-01-16 20:31:15 +0000336 </ant>
337 </target>
david_williamsa76816d2006-12-11 20:10:22 +0000338
david_williams5a741f72008-07-02 04:29:23 +0000339 <!--
david_williams28df8fd2008-07-01 06:25:59 +0000340 Steps to do after running assemble.
341 -->
david_williams5a741f72008-07-02 04:29:23 +0000342 <target
david_williams33dbe502009-11-20 15:30:38 +0000343 name="postAssemble"></target>
david_williamsa76816d2006-12-11 20:10:22 +0000344
david_williams5a741f72008-07-02 04:29:23 +0000345 <!--
david_williams28df8fd2008-07-01 06:25:59 +0000346 Steps to do after the build is done.
347 -->
david_williams5a741f72008-07-02 04:29:23 +0000348 <target
david_williams33dbe502009-11-20 15:30:38 +0000349 name="postBuild"></target>
david_williamsa76816d2006-12-11 20:10:22 +0000350
david_williams5a741f72008-07-02 04:29:23 +0000351 <!--
david_williams28df8fd2008-07-01 06:25:59 +0000352 Steps to do to test the build results
david_williams5a741f72008-07-02 04:29:23 +0000353 -->
354 <target
david_williams33dbe502009-11-20 15:30:38 +0000355 name="test"></target>
david_williamsa76816d2006-12-11 20:10:22 +0000356
david_williams5a741f72008-07-02 04:29:23 +0000357 <!--
david_williams28df8fd2008-07-01 06:25:59 +0000358 Steps to do to publish the build results
359 -->
david_williams5a741f72008-07-02 04:29:23 +0000360 <target
david_williams33dbe502009-11-20 15:30:38 +0000361 name="publish"></target>
david_williamsa76816d2006-12-11 20:10:22 +0000362
david_williams5a741f72008-07-02 04:29:23 +0000363 <!--
david_williams28df8fd2008-07-01 06:25:59 +0000364 Helper targets
365 -->
david_williamsa3e48362007-08-22 04:21:50 +0000366 <target
367 name="gatherLogs"
368 if="logsAvailable">
david_williams5a741f72008-07-02 04:29:23 +0000369 <mkdir
370 dir="${buildDirectory}/${buildLabel}/compilelogs"/>
david_williams403beae2007-12-09 02:10:40 +0000371 <echo
372 level="debug"
david_williams5a741f72008-07-02 04:29:23 +0000373 message="logExtension: ${logExtension}"/>
374 <antcall
375 target="allElements">
david_williamsa3e48362007-08-22 04:21:50 +0000376 <param
377 name="target"
david_williams5a741f72008-07-02 04:29:23 +0000378 value="gatherLogs"/>
379 <param
380 name="logExtension"
381 value="${logExtension}"/>
david_williamsa76816d2006-12-11 20:10:22 +0000382 </antcall>
david_williamsa3e48362007-08-22 04:21:50 +0000383 <unzip
384 dest="${buildDirectory}/${buildLabel}/compilelogs"
385 overwrite="true">
david_williams5a741f72008-07-02 04:29:23 +0000386 <fileset
david_williams33dbe502009-11-20 15:30:38 +0000387 dir="${buildDirectory}/features/${buildfeature}">
david_williams5a741f72008-07-02 04:29:23 +0000388 <include
389 name="**/*.log.zip"/>
david_williamsa76816d2006-12-11 20:10:22 +0000390 </fileset>
391 </unzip>
david_williamsa76816d2006-12-11 20:10:22 +0000392 </target>
david_williamsa3e48362007-08-22 04:21:50 +0000393 <target
394 name="clean"
395 unless="noclean">
david_williams5a741f72008-07-02 04:29:23 +0000396 <antcall
397 target="allElements">
david_williamsa3e48362007-08-22 04:21:50 +0000398 <param
399 name="target"
david_williams5a741f72008-07-02 04:29:23 +0000400 value="cleanElement"/>
david_williamsa76816d2006-12-11 20:10:22 +0000401 </antcall>
402 </target>
403
david_williams5a741f72008-07-02 04:29:23 +0000404 <!--
david_williams28df8fd2008-07-01 06:25:59 +0000405 Default target
406 -->
david_williams5a741f72008-07-02 04:29:23 +0000407 <target
408 name="noDefault">
david_williams403beae2007-12-09 02:10:40 +0000409 <echo
410 level="error"
david_williams5a741f72008-07-02 04:29:23 +0000411 message="You must specify a target when invoking this file"/>
david_williamsa76816d2006-12-11 20:10:22 +0000412 </target>
david_williams5a741f72008-07-02 04:29:23 +0000413</project>