blob: ea7c28586be52d641f885e16aa5a35a87929939d [file] [log] [blame]
david_williamsc342cbe2006-12-11 19:38:19 +00001<project
david_williams05dbe622007-12-09 01:20:57 +00002 name="PDECustomTargets"
3 default="noDefault"
david_williams403beae2007-12-09 02:10:40 +00004 basedir=".">
5
david_williams886167e2007-12-13 04:42:37 +00006
7 <!-- = = = standard properties pattern = = = -->
8
9 <!--
10 Note to be cross-platform, "environment variables" are only appropriate for
11 some variables, e.g. ones we set, since properties are case sensitive, even if
12 the environment variables on your operating system are not, e.g. it will
13 be ${env.Path} not ${env.PATH} on Windows -->
14 <property environment="env" />
15
16 <!--
17 Let users override standard properties, if desired.
18 If directory, file, or some properties do not exist,
19 then standard properties will be used.
20 -->
21 <property
22 file="${env.LOCAL_BUILD_PROPERTIES_DIR}/${ant.project.name}.properties" />
23
24 <!-- let this project specify properties, if not already set -->
25 <property file="build.properties" />
26
david_williams403beae2007-12-09 02:10:40 +000027
david_williams842e4192007-12-09 07:44:35 +000028 <property
29 name="cvsProtocol"
david_williamsd4b1fd32008-01-02 04:16:52 +000030 value="${env.BUILD_CVS_WRITE_PROTOCOL}" />
david_williams842e4192007-12-09 07:44:35 +000031 <property
32 name="cvsUser"
david_williamsd4b1fd32008-01-02 04:16:52 +000033 value="${env.BUILD_CVS_WRITE_USER}" />
david_williams842e4192007-12-09 07:44:35 +000034 <property
35 name="cvsServer"
david_williamsd4b1fd32008-01-02 04:16:52 +000036 value="${env.BUILD_CVS_SERVER}" />
david_williams842e4192007-12-09 07:44:35 +000037 <property
38 name="cvsRoot"
david_williamsd4b1fd32008-01-02 04:16:52 +000039 value="${env.BUILD_CVS_ROOT}" />
david_williams842e4192007-12-09 07:44:35 +000040
david_williams3696f6f2005-12-30 07:59:43 +000041 <!-- ===================================================================== -->
42 <!-- Run a given ${target} on all elements being built -->
43 <!-- Add on <ant> task for each top level element being built. -->
44 <!-- ===================================================================== -->
45 <target name="allElements">
david_williams403beae2007-12-09 02:10:40 +000046 <echo
47 level="info"
48 message="Target:${target} " />
49 <echo
50 level="debug"
51 message="basedir: ${basedir}" />
52 <echo
53 level="debug"
54 message="component: ${component}" />
55 <echo
56 level="debug"
57 message="buildDirectory: ${buildDirectory}" />
58 <echo
59 level="debug"
60 message="baseLocation: ${baseLocation}" />
david_williamsc342cbe2006-12-11 19:38:19 +000061 <ant
62 antfile="${genericTargets}"
63 target="${target}">
64 <property
65 name="type"
66 value="feature" />
67 <property
68 name="id"
69 value="org.eclipse.jst.tests" />
david_williams3696f6f2005-12-30 07:59:43 +000070 </ant>
71 </target>
ndaib8cedc82005-09-13 18:00:32 +000072
david_williams3696f6f2005-12-30 07:59:43 +000073 <!-- ===================================================================== -->
74 <!-- Targets to assemble the built elements for particular configurations -->
75 <!-- These generally call the generated assemble scripts (named in -->
76 <!-- ${assembleScriptName}) but may also add pre and post processing -->
77 <!-- Add one target for each root element and each configuration -->
78 <!-- ===================================================================== -->
ndaib8cedc82005-09-13 18:00:32 +000079
david_williams3696f6f2005-12-30 07:59:43 +000080 <target name="assemble.org.eclipse.jst.tests">
david_williamsc342cbe2006-12-11 19:38:19 +000081 <property
82 name="archiveName"
83 value="wtp-jst-Automated-Tests-${buildLabel}.zip" />
84 <ant
85 antfile="${assembleScriptName}"
86 dir="${buildDirectory}" />
ndaib8cedc82005-09-13 18:00:32 +000087
david_williamsa0aec8e2006-05-23 00:29:00 +000088 </target>
89
david_williamsd913e922006-11-13 07:24:21 +000090 <target name="prePackage" />
david_williamsa0aec8e2006-05-23 00:29:00 +000091
92
93 <target name="postPackage">
94
david_williamsc342cbe2006-12-11 19:38:19 +000095 <property
96 name="archiveName"
97 value="wtp-jst-Automated-Tests-${buildLabel}.zip" />
david_williamsa0aec8e2006-05-23 00:29:00 +000098
david_williamsc342cbe2006-12-11 19:38:19 +000099 <ant
100 antfile="${wtp.builder.home}/scripts/build/buildutilities.xml"
101 target="unpackUpdateJarsAndCreateZippedPackages">
102 <property
103 name="buildDirectory"
104 value="${buildDirectory}" />
105 <property
106 name="buildLabel"
107 value="${buildLabel}" />
108 <property
109 name="archiveName"
110 value="${archiveName}" />
david_williamsd913e922006-11-13 07:24:21 +0000111 </ant>
david_williams072c6f72006-05-19 10:50:58 +0000112
david_williams3696f6f2005-12-30 07:59:43 +0000113 </target>
ndaib8cedc82005-09-13 18:00:32 +0000114
david_williams3696f6f2005-12-30 07:59:43 +0000115 <!-- ===================================================================== -->
116 <!-- Check out map files from correct repository -->
117 <!-- Replace values for cvsRoot, package and mapVersionTag as desired. -->
118 <!-- ===================================================================== -->
david_williams403beae2007-12-09 02:10:40 +0000119 <target
120 name="checkLocal"
121 depends="check.useLocalMaps"
122 if="useLocalMaps">
david_williamsc342cbe2006-12-11 19:38:19 +0000123 <available
124 property="mapsLocal"
david_williams34163522007-11-18 00:18:20 +0000125 file="${buildDirectory}/maps/${env.RELENG}" />
david_williams3696f6f2005-12-30 07:59:43 +0000126 </target>
david_williamsc342cbe2006-12-11 19:38:19 +0000127 <target
128 name="getMapFiles"
129 depends="checkLocal"
130 unless="mapsLocal">
ndaib8cedc82005-09-13 18:00:32 +0000131
david_williams3696f6f2005-12-30 07:59:43 +0000132 <!-- *** change the repo info -->
david_williamsc342cbe2006-12-11 19:38:19 +0000133 <property
134 name="mapCvsRoot"
135 value=":${cvsProtocol}:${cvsUser}@${cvsServer}:${cvsRoot}" />
david_williams5ad66ff2007-07-01 03:35:33 +0000136
137 <!-- if not otherwise set, assume HEAD -->
david_williamsc342cbe2006-12-11 19:38:19 +0000138 <property
139 name="mapVersionTag"
140 value="HEAD" />
david_williams5d9c9862007-11-19 04:42:55 +0000141
david_williams5ad66ff2007-07-01 03:35:33 +0000142 <property
david_williams7f01a0d2007-12-10 02:17:05 +0000143 name="releng.jsf-mapVersionTag"
david_williams5ad66ff2007-07-01 03:35:33 +0000144 value="HEAD" />
145
146
david_williams403beae2007-12-09 02:10:40 +0000147 <echo
148 level="info"
149 message="${mapCvsRoot} ${mapVersionTag} ">
150 </echo>
151 <property
david_williams5d9c9862007-11-19 04:42:55 +0000152 name="cvsPackage"
153 value="${env.RELENGMAPS}" />
david_williams403beae2007-12-09 02:10:40 +0000154 <echo
155 level="debug"
156 message="${mapCvsRoot} ${mapVersionTag} " />
157 <echo
158 level="debug"
159 message="cvsPackage = ${cvsPackage} " />
david_williamsc342cbe2006-12-11 19:38:19 +0000160 <cvs
161 cvsRoot="${mapCvsRoot}"
david_williams5d9c9862007-11-19 04:42:55 +0000162 package="${cvsPackage}"
david_williamsc342cbe2006-12-11 19:38:19 +0000163 dest="${buildDirectory}/maps"
david_williamsa3e48362007-08-22 04:21:50 +0000164 tag="${mapVersionTag}"
165 quiet="${env.CVS_QUIET}"
166 reallyquiet="${env.CVS_REALLY_QUIET}" />
david_williams403beae2007-12-09 02:10:40 +0000167 <!--
168 <cvs
169 cvsRoot="${mapCvsRoot}"
170 package="${env.RELENGMAPS}"
171 dest="${buildDirectory}/maps"
172 tag="${mapVersionTag}"
173 quiet="${env.CVS_QUIET}"
174 reallyquiet="${env.CVS_REALLY_QUIET}" />
175 -->
david_williams5d9c9862007-11-19 04:42:55 +0000176
david_williams5bc53f12007-11-19 05:17:01 +0000177 <cvs
178 cvsRoot="${mapCvsRoot}"
179 package="${env.RELENGJSF}"
180 dest="${buildDirectory}/maps"
david_williams7f01a0d2007-12-10 02:17:05 +0000181 tag="${releng.jsf-mapVersionTag}"
david_williams5bc53f12007-11-19 05:17:01 +0000182 quiet="${env.CVS_QUIET}"
183 reallyquiet="${env.CVS_REALLY_QUIET}" />
184
david_williams5ad66ff2007-07-01 03:35:33 +0000185 <!--tag the map files project-->
186 <antcall target="tagMapFiles">
187 <param
188 name="mapCvsRoot"
189 value="${mapCvsRoot}" />
190 </antcall>
david_williams5b401202007-06-07 23:49:38 +0000191
david_williams403beae2007-12-09 02:10:40 +0000192 <!-- copy all maps to the same place. Be sure to copy only "maps", as there may be "dependancies" etc,
193 that could be out of date -->
194 <!-- turns out this "one flat directory" appears not needed!
195 <copy todir="${buildDirectory}/maps/${env.RELENG}/maps" flatten="true">
196 <fileset dir="${buildDirectory}/maps/">
197 <include name="**/*.map" />
198 </fileset>
199 </copy>
200 -->
201
david_williams3696f6f2005-12-30 07:59:43 +0000202 </target>
ndaib8cedc82005-09-13 18:00:32 +0000203
david_williamsc342cbe2006-12-11 19:38:19 +0000204 <target
205 name="tagMapFiles"
206 if="tagMaps">
207 <cvs
208 cvsRoot="${mapCvsRoot}"
209 dest="${buildDirectory}/maps"
david_williamsa3e48362007-08-22 04:21:50 +0000210 command="tag v${buildType}${timestamp}"
211 quiet="${env.CVS_QUIET}"
212 reallyquiet="${env.CVS_REALLY_QUIET}" />
david_williams3696f6f2005-12-30 07:59:43 +0000213 </target>
ndaib8cedc82005-09-13 18:00:32 +0000214
215
david_williams3696f6f2005-12-30 07:59:43 +0000216 <!-- ===================================================================== -->
217 <!-- Steps to do before setup -->
218 <!-- ===================================================================== -->
david_williamsc342cbe2006-12-11 19:38:19 +0000219 <target name="preSetup"></target>
ndaib8cedc82005-09-13 18:00:32 +0000220
david_williams3696f6f2005-12-30 07:59:43 +0000221 <!-- ===================================================================== -->
222 <!-- Steps to do after setup but before starting the build proper -->
223 <!-- ===================================================================== -->
224 <target name="postSetup">
david_williamsc342cbe2006-12-11 19:38:19 +0000225 <dirname
226 file="${ant.file}"
227 property="component.dir" />
david_williams403beae2007-12-09 02:10:40 +0000228 <echo
229 level="debug"
230 message="ant.file: ${ant.file}" />
231 <echo
232 level="debug"
233 message="component.dir: ${component.dir}" />
david_williams5d9c9862007-11-19 04:42:55 +0000234
david_williamsc342cbe2006-12-11 19:38:19 +0000235 <ant
236 antfile="${component.dir}/dependency.xml"
237 target="get">
238 <property
239 name="dependency.properties"
david_williams771c0a12007-11-17 02:19:01 +0000240 value="${buildDirectory}/maps/${env.RELENG}/maps/dependencies.properties" />
david_williamsc342cbe2006-12-11 19:38:19 +0000241 <property
242 name="base.install.dir"
243 value="${buildRoot}" />
david_williams3696f6f2005-12-30 07:59:43 +0000244 </ant>
david_williamsd913e922006-11-13 07:24:21 +0000245
david_williams3696f6f2005-12-30 07:59:43 +0000246 </target>
ndaib8cedc82005-09-13 18:00:32 +0000247
david_williams3696f6f2005-12-30 07:59:43 +0000248 <!-- ===================================================================== -->
249 <!-- Steps to do before fetching the build elements -->
250 <!-- ===================================================================== -->
david_williamsc342cbe2006-12-11 19:38:19 +0000251 <target name="preFetch"></target>
ndaib8cedc82005-09-13 18:00:32 +0000252
david_williams3696f6f2005-12-30 07:59:43 +0000253 <!-- ===================================================================== -->
254 <!-- Steps to do after fetching the build elements -->
255 <!-- ===================================================================== -->
david_williamsc342cbe2006-12-11 19:38:19 +0000256 <target name="postFetch"></target>
ndaib8cedc82005-09-13 18:00:32 +0000257
david_williams3696f6f2005-12-30 07:59:43 +0000258 <!-- ===================================================================== -->
259 <!-- Steps to do before generating the build scripts. -->
260 <!-- ===================================================================== -->
david_williams5ad66ff2007-07-01 03:35:33 +0000261 <target name="postGenerate">
david_williams403beae2007-12-09 02:10:40 +0000262 <customizeAccessRules
david_williams5ad66ff2007-07-01 03:35:33 +0000263 bundleDirectory="${buildDirectory}/plugins"
264 defaultRules="+org/eclipse/wst/**/*, +org/eclipse/jst/**/*" />
265 </target>
david_williams3696f6f2005-12-30 07:59:43 +0000266 <!-- ===================================================================== -->
267 <!-- Steps to do after generating the build scripts. -->
268 <!-- ===================================================================== -->
david_williams0b74c592007-04-09 06:11:35 +0000269 <target name="preGenerate"></target>
ndaib8cedc82005-09-13 18:00:32 +0000270
271
david_williams3696f6f2005-12-30 07:59:43 +0000272 <!-- ===================================================================== -->
273 <!-- Steps to do before running the build.xmls for the elements being built. -->
274 <!-- ===================================================================== -->
david_williamsc342cbe2006-12-11 19:38:19 +0000275 <target name="preProcess"></target>
ndaib8cedc82005-09-13 18:00:32 +0000276
david_williams3696f6f2005-12-30 07:59:43 +0000277 <!-- ===================================================================== -->
278 <!-- Steps to do after running the build.xmls for the elements being built. -->
279 <!-- ===================================================================== -->
david_williamsc84ab8c2006-12-11 18:50:34 +0000280 <target name="postProcess">
281 <condition property="logsAvailable">
282 <istrue value="${javacVerbose}" />
283 </condition>
284 <antcall target="gatherLogs" />
david_williamsc84ab8c2006-12-11 18:50:34 +0000285 </target>
ndaib8cedc82005-09-13 18:00:32 +0000286
287
david_williams3696f6f2005-12-30 07:59:43 +0000288 <!-- ===================================================================== -->
289 <!-- Steps to do before running assemble. -->
290 <!-- ===================================================================== -->
david_williamsc342cbe2006-12-11 19:38:19 +0000291 <target name="preAssemble"></target>
ndaib8cedc82005-09-13 18:00:32 +0000292
david_williams3696f6f2005-12-30 07:59:43 +0000293 <!-- ===================================================================== -->
294 <!-- Steps to do after running assemble. -->
295 <!-- ===================================================================== -->
david_williamsc342cbe2006-12-11 19:38:19 +0000296 <target name="postAssemble"></target>
ndaib8cedc82005-09-13 18:00:32 +0000297
david_williams3696f6f2005-12-30 07:59:43 +0000298 <!-- ===================================================================== -->
299 <!-- Steps to do after the build is done. -->
300 <!-- ===================================================================== -->
david_williams5ad66ff2007-07-01 03:35:33 +0000301 <target name="postBuild"></target>
ndaib8cedc82005-09-13 18:00:32 +0000302
ndaib8cedc82005-09-13 18:00:32 +0000303
david_williams3696f6f2005-12-30 07:59:43 +0000304 <!-- ===================================================================== -->
david_williams5d9c9862007-11-19 04:42:55 +0000305 <!-- Steps to test the build results -->
david_williams3696f6f2005-12-30 07:59:43 +0000306 <!-- ===================================================================== -->
david_williamsc342cbe2006-12-11 19:38:19 +0000307 <target name="test"></target>
david_williams3696f6f2005-12-30 07:59:43 +0000308
309
310 <!-- ===================================================================== -->
311 <!-- Steps to do to publish the build results -->
312 <!-- ===================================================================== -->
david_williamsc342cbe2006-12-11 19:38:19 +0000313 <target name="publish"></target>
david_williamsc84ab8c2006-12-11 18:50:34 +0000314
315 <!-- ===================================================================== -->
316 <!-- Helper targets -->
317 <!-- ===================================================================== -->
david_williamsc342cbe2006-12-11 19:38:19 +0000318 <target
319 name="gatherLogs"
320 if="logsAvailable">
david_williamsc84ab8c2006-12-11 18:50:34 +0000321 <mkdir dir="${buildDirectory}/${buildLabel}/testcompilelogs" />
david_williams403beae2007-12-09 02:10:40 +0000322 <echo
323 level="debug"
324 message="logExtension: ${logExtension}" />
david_williamsc84ab8c2006-12-11 18:50:34 +0000325 <antcall target="allElements">
david_williamsc342cbe2006-12-11 19:38:19 +0000326 <param
327 name="target"
328 value="gatherLogs" />
david_williams803b3cd2007-12-13 07:37:16 +0000329 <param
330 name="logExtension"
331 value="${logExtension}" />
david_williamsc84ab8c2006-12-11 18:50:34 +0000332 </antcall>
david_williamsc342cbe2006-12-11 19:38:19 +0000333 <unzip
334 dest="${buildDirectory}/${buildLabel}/testcompilelogs"
335 overwrite="true">
david_williams5ad66ff2007-07-01 03:35:33 +0000336 <fileset
337 dir="${buildDirectory}/features/org.eclipse.jst.tests">
david_williamsc84ab8c2006-12-11 18:50:34 +0000338 <include name="**/*.log.zip" />
339 </fileset>
340 </unzip>
341
342
david_williams0b74c592007-04-09 06:11:35 +0000343
david_williamsc84ab8c2006-12-11 18:50:34 +0000344 </target>
345
david_williamsc342cbe2006-12-11 19:38:19 +0000346 <target
347 name="clean"
348 unless="noclean">
david_williamsc84ab8c2006-12-11 18:50:34 +0000349 <antcall target="allElements">
david_williamsc342cbe2006-12-11 19:38:19 +0000350 <param
351 name="target"
352 value="cleanElement" />
david_williamsc84ab8c2006-12-11 18:50:34 +0000353 </antcall>
354 </target>
david_williams3696f6f2005-12-30 07:59:43 +0000355
356 <!-- ===================================================================== -->
357 <!-- Default target -->
358 <!-- ===================================================================== -->
359 <target name="noDefault">
david_williams403beae2007-12-09 02:10:40 +0000360 <echo
361 level="error"
david_williams5ad66ff2007-07-01 03:35:33 +0000362 message="You must specify a target when invoking this file" />
david_williams3696f6f2005-12-30 07:59:43 +0000363 </target>
ndaib8cedc82005-09-13 18:00:32 +0000364
david_williams403beae2007-12-09 02:10:40 +0000365 <target name="check.useLocalMaps">
366 <condition property="useLocalMaps">
367 <equals
368 arg1="${env.USE_LOCAL_MAPS}"
369 arg2="true" />
370 </condition>
371 </target>
david_williams5d9c9862007-11-19 04:42:55 +0000372
ndaib8cedc82005-09-13 18:00:32 +0000373</project>