blob: 47e7242d48ab37984a5c1d397c746415f091bcc0 [file] [log] [blame]
david_williams403beae2007-12-09 02:10:40 +00001<project
2 default="build"
3 basedir=".">
david_williams6b0f6112008-04-02 21:29:30 +00004 <fail
david_williamsf101fce2008-10-08 05:02:42 +00005 unless="wtp.builder.home"/>
david_williams6b0f6112008-04-02 21:29:30 +00006 <property
david_williamsf101fce2008-10-08 05:02:42 +00007 file="${wtp.builder.home}/build.properties"/>
8
9 <property
10 environment="env"/>
11
12 <!-- required to get proper value of doCreateFprojZips -->
david_williams0e922a12008-08-19 20:36:23 +000013 <property
14 name="keyCfgFile"
15 value="${env.PROJECT_BUILDERS}/${projectname}/${env.RELENG}/maps/build.cfg"/>
16 <echo
17 level="debug"
18 message="keyCfgFile: ${keyCfgFile}"/>
19 <property
20 file="${keyCfgFile}"/>
david_williamsf101fce2008-10-08 05:02:42 +000021
22 <!-- main -->
david_williams403beae2007-12-09 02:10:40 +000023 <target
24 name="build"
25 depends="getBaseBuilder">
26 <dirname
27 file="${ant.file}"
david_williamsf101fce2008-10-08 05:02:42 +000028 property="distribution.wtp.build.dir"/>
david_williams403beae2007-12-09 02:10:40 +000029 <property
30 name="buildTargets"
david_williamsf101fce2008-10-08 05:02:42 +000031 value="${wtp.builder.home}/scripts/build/runbuild.xml"/>
david_williams82a6c642008-10-08 14:52:33 +000032
david_williams2f53d7b2009-08-03 05:48:34 +000033 <!-- for this distribution, dependencies come from releng.
34 assume no subdirectory, if not otherwise set (bug 285383).
35 -->
36 <property name="env.DEP_DIR" value="" />
37
david_williams82a6c642008-10-08 14:52:33 +000038 <property
39 name="dependency.properties"
david_williams2f53d7b2009-08-03 05:48:34 +000040 value="${buildDirectory}/maps/${env.RELENG}/${env.DEP_DIR}/maps/dependencies.properties"/>
david_williams82a6c642008-10-08 14:52:33 +000041
42 <!-- calling label.xml to createg label.properties file -->
43 <ant
44 antfile="${wtp.builder.home}/scripts/build/label.xml"/>
45
david_williams6b0f6112008-04-02 21:29:30 +000046 <echo
david_williams1e71b282008-03-10 10:12:40 +000047 level="info"
david_williamsf101fce2008-10-08 05:02:42 +000048 message="invoking buildTargets: ${buildTargets} to build for each component"/>
david_williams0c366d32006-12-10 07:08:39 +000049
david_williamsf101fce2008-10-08 05:02:42 +000050 <!-- minimal runtimes -->
51 <!--
david_williamsd913e922006-11-13 07:24:21 +000052
david_williamsf101fce2008-10-08 05:02:42 +000053 <ant antfile="${buildTargets}"> <property name="component"
54 value="common" /> </ant> <ant antfile="${buildTargets}">
55 <property name="component" value="jsdt" /> </ant> <ant
56 antfile="${buildTargets}"> <property name="component"
57 value="xml" /> </ant>
58 -->
david_williams15815ba2009-03-17 06:02:20 +000059
david_williamsf101fce2008-10-08 05:02:42 +000060 <ant
61 antfile="${buildTargets}">
62 <property
63 name="component"
64 value="wst"/>
65 </ant>
david_williams15815ba2009-03-17 06:02:20 +000066
david_williamsf101fce2008-10-08 05:02:42 +000067 <ant
68 antfile="${buildTargets}">
69 <property
70 name="component"
71 value="wst-sdk"/>
72 </ant>
david_williams15815ba2009-03-17 06:02:20 +000073
david_williamsf101fce2008-10-08 05:02:42 +000074 <ant
75 antfile="${buildTargets}">
76 <property
77 name="component"
78 value="wst.tests"/>
79 <property
80 name="eclipseBuildFailOnError"
david_williams15815ba2009-03-17 06:02:20 +000081 value="true"/>
david_williamsf101fce2008-10-08 05:02:42 +000082 </ant>
83
84 <ant
85 antfile="${buildTargets}">
86 <property
87 name="component"
88 value="jst"/>
89 </ant>
90 <ant
91 antfile="${buildTargets}">
92 <property
93 name="component"
94 value="jst-sdk"/>
95 </ant>
96 <ant
97 antfile="${buildTargets}">
98 <property
99 name="component"
100 value="jst.tests"/>
101 <property
102 name="eclipseBuildFailOnError"
david_williams15815ba2009-03-17 06:02:20 +0000103 value="true"/>
david_williamsf101fce2008-10-08 05:02:42 +0000104 </ant>
david_williams82a6c642008-10-08 14:52:33 +0000105
david_williamsf101fce2008-10-08 05:02:42 +0000106 <ant
107 antfile="${buildTargets}">
108 <property
109 name="component"
110 value="dali"/>
111 <property
112 name="eclipseBuildFailOnError"
113 value="true"/>
114 </ant>
115
116 <!-- extender (SDK) versions -->
117 <!--
118 <ant antfile="${buildTargets}"> <property name="component"
119 value="common-sdk" /> </ant> <ant antfile="${buildTargets}">
120 <property name="component" value="jsdt-sdk" /> </ant> <ant
121 antfile="${buildTargets}"> <property name="component"
122 value="xml-sdk" /> </ant>
123 -->
124
125 <ant
126 antfile="${buildTargets}">
127 <property
128 name="component"
129 value="dali-sdk"/>
130 <property
131 name="eclipseBuildFailOnError"
132 value="true"/>
133 </ant>
134
135 <!-- JUnit test code -->
136 <!--
137 <ant antfile="${buildTargets}"> <property name="component"
138 value="common.tests" /> <property
139 name="eclipseBuildFailOnError" value="false" /> </ant> <ant
140 antfile="${buildTargets}"> <property name="component"
141 value="jsdt.tests" /> <property
142 name="eclipseBuildFailOnError" value="false" /> </ant> <ant
143 antfile="${buildTargets}"> <property name="component"
144 value="xml.tests" /> <property
145 name="eclipseBuildFailOnError" value="false" /> </ant>
146 -->
147
148
149 <ant
150 antfile="${buildTargets}">
151 <property
152 name="component"
153 value="dali.tests"/>
154 <property
155 name="eclipseBuildFailOnError"
david_williams15815ba2009-03-17 06:02:20 +0000156 value="true"/>
david_williamsf101fce2008-10-08 05:02:42 +0000157 </ant>
158
david_williamsf101fce2008-10-08 05:02:42 +0000159 <!-- package -->
160 <antcall
161 target="package"/>
david_williams403beae2007-12-09 02:10:40 +0000162 </target>
163
david_williamsf101fce2008-10-08 05:02:42 +0000164 <!-- invoking runbuild.xml targetting getBaseBuilder -->
david_williams403beae2007-12-09 02:10:40 +0000165 <target
166 name="getBaseBuilder"
167 if="eclipse.builder.fetch">
168 <dirname
169 file="${ant.file}"
david_williamsf101fce2008-10-08 05:02:42 +0000170 property="wtbuilder.dir"/>
david_williams403beae2007-12-09 02:10:40 +0000171 <property
172 name="buildTargets"
david_williamsf101fce2008-10-08 05:02:42 +0000173 value="${wtp.builder.home}/scripts/build/runbuild.xml"/>
david_williams1e71b282008-03-10 10:12:40 +0000174 <echo
175 level="info"
david_williamsf101fce2008-10-08 05:02:42 +0000176 message="invoking buildTargets: ${buildTargets} -> getBaseBuilder"/>
david_williams403beae2007-12-09 02:10:40 +0000177 <ant
178 antfile="${buildTargets}"
david_williamsf101fce2008-10-08 05:02:42 +0000179 target="getBaseBuilder"/>
david_williams403beae2007-12-09 02:10:40 +0000180 </target>
david_williams6b0f6112008-04-02 21:29:30 +0000181 <target
182 name="package">
david_williams06e43382008-06-10 01:20:21 +0000183 <!--
184 post, post packaging, for WTP ... "manually" assemble the
185 desired zips
186 -->
david_williams6b0f6112008-04-02 21:29:30 +0000187 <antcall
188 target="combineArchives">
david_williams403beae2007-12-09 02:10:40 +0000189 <param
190 name="corename"
david_williamsf101fce2008-10-08 05:02:42 +0000191 value=""/>
david_williams403beae2007-12-09 02:10:40 +0000192 </antcall>
david_williams6b0f6112008-04-02 21:29:30 +0000193 <antcall
194 target="combineArchives">
david_williams403beae2007-12-09 02:10:40 +0000195 <param
196 name="corename"
david_williamsf101fce2008-10-08 05:02:42 +0000197 value="-sdk"/>
david_williams403beae2007-12-09 02:10:40 +0000198 </antcall>
david_williams6b0f6112008-04-02 21:29:30 +0000199 <antcall
200 target="combineArchives">
david_williams403beae2007-12-09 02:10:40 +0000201 <param
202 name="corename"
david_williamsf101fce2008-10-08 05:02:42 +0000203 value="-Automated-Tests"/>
david_williams403beae2007-12-09 02:10:40 +0000204 </antcall>
david_williams6b0f6112008-04-02 21:29:30 +0000205 <antcall
206 target="createNoOptionalZip">
207 <param
208 name="archiveName"
david_williamsf101fce2008-10-08 05:02:42 +0000209 value="wtp-${buildLabel}.zip"/>
david_williams6b0f6112008-04-02 21:29:30 +0000210 <param
211 name="newarchiveName"
david_williamsf101fce2008-10-08 05:02:42 +0000212 value="wtp-noop-${buildLabel}.zip"/>
david_williams6b0f6112008-04-02 21:29:30 +0000213 </antcall>
214 <antcall
215 target="createNoOptionalZip">
216 <param
217 name="archiveName"
david_williamsf101fce2008-10-08 05:02:42 +0000218 value="wtp-sdk-${buildLabel}.zip"/>
david_williams6b0f6112008-04-02 21:29:30 +0000219 <param
220 name="newarchiveName"
david_williamsf101fce2008-10-08 05:02:42 +0000221 value="wtp-sdk-noop-${buildLabel}.zip"/>
david_williams6b0f6112008-04-02 21:29:30 +0000222 </antcall>
david_williamsf101fce2008-10-08 05:02:42 +0000223 <antcall
224 target="createFprojZips"/>
david_williams403beae2007-12-09 02:10:40 +0000225 </target>
david_williams6b0f6112008-04-02 21:29:30 +0000226 <target
227 name="createNoOptionalZip">
228 <zip
229 destfile="${buildDirectory}/${buildLabel}/${newarchiveName}">
230 <zipfileset
david_williams70900082008-04-02 23:23:15 +0000231 src="${buildDirectory}/${buildLabel}/${archiveName}"
david_williamsc39b1dc2009-04-12 02:32:28 +0000232 excludes="eclipse/features/org.eclipse.wst.xsl*/**,eclipse/plugins/org.eclipse.wst.xsl*/**,eclipse/plugins/org.eclipse.jst.ws.axis2*/**,eclipse/plugins/org.eclipse.jst.jsf.apache.trinidad.tagsupport*/**,eclipse/plugins/org.eclipse.jst.pagedesigner*/**,eclipse/plugins/org.eclipse.jpt.eclipselink*/**,eclipse/features/org.eclipse.jst.ws.axis2tools*/**,eclipse/features/org.eclipse.jst.webpageeditor*/**,eclipse/features/org.eclipse.jst.jsf.apache.trinidad.tagsupport*/**,eclipse/features/org.eclipse.jpt.eclipselink*/**,eclipse/plugins/java_cup.runtime*/**,eclipse/plugins/org.apache.bcel*/**,eclipse/plugins/org.apache.commons.jxpath*/**,eclipse/plugins/org.apache.xalan*/**,eclipse/plugins/org.apache.commons.logging_1.1*/**"/>
david_williams6b0f6112008-04-02 21:29:30 +0000233 </zip>
234 <ant
235 antfile="${wtp.builder.home}/scripts/build/buildutilities.xml"
236 target="createChecksums">
237 <property
238 name="buildDirectory"
david_williamsf101fce2008-10-08 05:02:42 +0000239 value="${buildDirectory}"/>
david_williams6b0f6112008-04-02 21:29:30 +0000240 <property
241 name="buildLabel"
david_williamsf101fce2008-10-08 05:02:42 +0000242 value="${buildLabel}"/>
david_williams6b0f6112008-04-02 21:29:30 +0000243 <property
244 name="archiveName"
david_williamsf101fce2008-10-08 05:02:42 +0000245 value="${newarchiveName}"/>
david_williams6b0f6112008-04-02 21:29:30 +0000246 </ant>
247 </target>
248 <target
249 name="combineArchives">
david_williams403beae2007-12-09 02:10:40 +0000250 <property
251 name="archiveName"
david_williamsf101fce2008-10-08 05:02:42 +0000252 value="wtp${corename}-${buildLabel}.zip"/>
david_williams403beae2007-12-09 02:10:40 +0000253 <delete
254 dir="${buildDirectory}/tempforrezipping"
david_williamsf101fce2008-10-08 05:02:42 +0000255 failonerror="false"/>
david_williamsc69daf92008-10-17 01:45:00 +0000256
257 <!-- make an empty directory. Can prevent a failure later, when doing some test builds -->
258 <mkdir dir="${buildDirectory}/tempforrezipping"/>
259
david_williams403beae2007-12-09 02:10:40 +0000260 <exec
261 dir="${buildDirectory}/${buildLabel}"
262 executable="unzip"
263 failonerror="false">
264 <arg
david_williamsf101fce2008-10-08 05:02:42 +0000265 line="-o -qq wtp-wst${corename}-${buildLabel}.zip -d ${buildDirectory}/tempforrezipping"/>
david_williams403beae2007-12-09 02:10:40 +0000266 </exec>
david_williams403beae2007-12-09 02:10:40 +0000267 <exec
268 dir="${buildDirectory}/${buildLabel}"
269 executable="unzip"
270 failonerror="false">
271 <arg
david_williamsf101fce2008-10-08 05:02:42 +0000272 line="-o -qq wtp-jst${corename}-${buildLabel}.zip -d ${buildDirectory}/tempforrezipping"/>
david_williams403beae2007-12-09 02:10:40 +0000273 </exec>
274
david_williams403beae2007-12-09 02:10:40 +0000275 <exec
276 dir="${buildDirectory}/${buildLabel}"
277 executable="unzip"
278 failonerror="false">
279 <arg
david_williamsf101fce2008-10-08 05:02:42 +0000280 line="-o -qq wtp-jpt${corename}-${buildLabel}.zip -d ${buildDirectory}/tempforrezipping"/>
david_williams403beae2007-12-09 02:10:40 +0000281 </exec>
david_williams403beae2007-12-09 02:10:40 +0000282 <zip
283 destfile="${buildDirectory}/${buildLabel}/${archiveName}"
david_williamsc69daf92008-10-17 01:45:00 +0000284 basedir="${buildDirectory}/tempforrezipping"
285 whenempty="create" />
286
david_williams403beae2007-12-09 02:10:40 +0000287 <delete
288 dir="${buildDirectory}/tempforrezipping"
david_williamsf101fce2008-10-08 05:02:42 +0000289 failonerror="false"/>
david_williams403beae2007-12-09 02:10:40 +0000290 <ant
291 antfile="${wtp.builder.home}/scripts/build/buildutilities.xml"
292 target="createChecksums">
293 <property
294 name="buildDirectory"
david_williamsf101fce2008-10-08 05:02:42 +0000295 value="${buildDirectory}"/>
david_williams403beae2007-12-09 02:10:40 +0000296 <property
297 name="buildLabel"
david_williamsf101fce2008-10-08 05:02:42 +0000298 value="${buildLabel}"/>
david_williams403beae2007-12-09 02:10:40 +0000299 <property
300 name="archiveName"
david_williamsf101fce2008-10-08 05:02:42 +0000301 value="${archiveName}"/>
david_williams403beae2007-12-09 02:10:40 +0000302 </ant>
303 </target>
david_williams0e922a12008-08-19 20:36:23 +0000304
david_williamsf101fce2008-10-08 05:02:42 +0000305 <!--
306 Handles packaging of individual Faceted Project Framework
307 distributions.
308 -->
david_williams0e922a12008-08-19 20:36:23 +0000309
david_williamsf101fce2008-10-08 05:02:42 +0000310 <target
311 name="createFprojZips"
312 if="doCreateFprojZips">
313
314 <delete
315 file="${buildDirectory}/${buildLabel}/wtp-common-fproj-${buildLabel}.zip"
316 failonerror="false"/>
317
318 <zip
319 destfile="${buildDirectory}/${buildLabel}/wtp-common-fproj-${buildLabel}.zip">
320 <zipfileset
321 src="${buildDirectory}/${buildLabel}/wtp-sdk-${buildLabel}.zip">
322 <include
323 name="eclipse/features/org.eclipse.wst.common.fproj_*/**"/>
324 <include
325 name="eclipse/plugins/org.eclipse.wst.common.project.facet.core_*.jar"/>
326 <include
327 name="eclipse/plugins/org.eclipse.wst.common.project.facet.ui_*.jar"/>
328 </zipfileset>
329 </zip>
330
331 <delete
332 file="${buildDirectory}/${buildLabel}/wtp-common-fproj-sdk-${buildLabel}.zip"
333 failonerror="false"/>
334
335 <zip
336 destfile="${buildDirectory}/${buildLabel}/wtp-common-fproj-sdk-${buildLabel}.zip">
337 <zipfileset
338 src="${buildDirectory}/${buildLabel}/wtp-common-fproj-${buildLabel}.zip"/>
339 <zipfileset
340 src="${buildDirectory}/${buildLabel}/wtp-sdk-${buildLabel}.zip">
341 <include
342 name="eclipse/features/org.eclipse.wst.common.fproj.sdk_*/**"/>
343 <include
344 name="eclipse/plugins/org.eclipse.wst.common.fproj.sdk_*.jar"/>
345 <include
346 name="eclipse/plugins/org.eclipse.wst.common.project.facet.doc.api_*.jar"/>
347 <include
348 name="eclipse/plugins/org.eclipse.wst.common.project.facet.core.source_*.jar"/>
349 <include
350 name="eclipse/plugins/org.eclipse.wst.common.project.facet.ui.source_*.jar"/>
351 </zipfileset>
352 </zip>
353
354 <delete
355 file="${buildDirectory}/${buildLabel}/wtp-common-fproj-enablement-jdt-${buildLabel}.zip"
356 failonerror="false"/>
357
358 <zip
359 destfile="${buildDirectory}/${buildLabel}/wtp-common-fproj-enablement-jdt-${buildLabel}.zip">
360 <zipfileset
361 src="${buildDirectory}/${buildLabel}/wtp-sdk-${buildLabel}.zip">
362 <include
363 name="eclipse/features/org.eclipse.jst.common.fproj.enablement.jdt_*/**"/>
364 <include
365 name="eclipse/plugins/org.eclipse.jst.common.project.facet.core_*.jar"/>
366 <include
367 name="eclipse/plugins/org.eclipse.jst.common.project.facet.ui_*.jar"/>
368 </zipfileset>
369 </zip>
370
371 <delete
372 file="${buildDirectory}/${buildLabel}/wtp-common-fproj-enablement-jdt-sdk-${buildLabel}.zip"
373 failonerror="false"/>
374
375 <zip
376 destfile="${buildDirectory}/${buildLabel}/wtp-common-fproj-enablement-jdt-sdk-${buildLabel}.zip">
377 <zipfileset
378 src="${buildDirectory}/${buildLabel}/wtp-common-fproj-enablement-jdt-${buildLabel}.zip"/>
379 <zipfileset
380 src="${buildDirectory}/${buildLabel}/wtp-sdk-${buildLabel}.zip">
381 <include
382 name="eclipse/features/org.eclipse.jst.common.fproj.enablement.jdt.sdk_*/**"/>
383 <include
384 name="eclipse/plugins/org.eclipse.jst.common.fproj.enablement.jdt.sdk_*.jar"/>
385 <include
386 name="eclipse/plugins/org.eclipse.jst.common.project.facet.core.source_*.jar"/>
387 <include
388 name="eclipse/plugins/org.eclipse.jst.common.project.facet.ui.source_*.jar"/>
389 </zipfileset>
390 </zip>
391
david_williamsc69daf92008-10-17 01:45:00 +0000392 <ant
393 antfile="${wtp.builder.home}/scripts/build/buildutilities.xml"
394 target="createChecksums">
395 <property
396 name="buildDirectory"
397 value="${buildDirectory}"/>
398 <property
399 name="buildLabel"
400 value="${buildLabel}"/>
401 <property
402 name="archiveName"
403 value="wtp-common-fproj-${buildLabel}.zip"/>
404 </ant>
405
406 <ant
407 antfile="${wtp.builder.home}/scripts/build/buildutilities.xml"
408 target="createChecksums">
409 <property
410 name="buildDirectory"
411 value="${buildDirectory}"/>
412 <property
413 name="buildLabel"
414 value="${buildLabel}"/>
415 <property
416 name="archiveName"
417 value="wtp-common-fproj-sdk-${buildLabel}.zip"/>
418 </ant>
419
420 <ant
421 antfile="${wtp.builder.home}/scripts/build/buildutilities.xml"
422 target="createChecksums">
423 <property
424 name="buildDirectory"
425 value="${buildDirectory}"/>
426 <property
427 name="buildLabel"
428 value="${buildLabel}"/>
429 <property
430 name="archiveName"
431 value="wtp-common-fproj-enablement-jdt-${buildLabel}.zip"/>
432 </ant>
433
434 <ant
435 antfile="${wtp.builder.home}/scripts/build/buildutilities.xml"
436 target="createChecksums">
437 <property
438 name="buildDirectory"
439 value="${buildDirectory}"/>
440 <property
441 name="buildLabel"
442 value="${buildLabel}"/>
443 <property
444 name="archiveName"
445 value="wtp-common-fproj-enablement-jdt-sdk-${buildLabel}.zip"/>
446 </ant>
447
david_williams0e922a12008-08-19 20:36:23 +0000448 </target>
david_williamsf101fce2008-10-08 05:02:42 +0000449
david_williams6b0f6112008-04-02 21:29:30 +0000450</project>