blob: 47e9f7ced77dd8fd39d1614b0db0b77ea017eec3 [file] [log] [blame]
david_williams06e43382008-06-10 01:20:21 +00001<project
2 name="PDECustomTargets"
3 default="noDefault"
4 basedir=".">
5
6
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
27
28 <property
29 name="cvsProtocol"
30 value="${env.BUILD_CVS_WRITE_PROTOCOL}" />
31 <property
32 name="cvsUser"
33 value="${env.BUILD_CVS_WRITE_USER}" />
34 <property
35 name="cvsServer"
36 value="${env.BUILD_CVS_SERVER}" />
37 <property
38 name="cvsRoot"
39 value="${env.BUILD_CVS_ROOT}" />
40
41 <!-- ===================================================================== -->
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">
46 <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}" />
61 <ant
62 antfile="${genericTargets}"
63 target="${target}">
64 <property
65 name="type"
66 value="feature" />
67 <property
68 name="id"
69 value="org.eclipse.wst.common.tests" />
70 </ant>
71 </target>
72
73 <!-- ===================================================================== -->
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 <!-- ===================================================================== -->
79
80 <target name="assemble.org.eclipse.wst.common.tests">
81 <property
82 name="archiveName"
83 value="wtp-common-Automated-Tests-${buildLabel}.zip" />
84 <ant
85 antfile="${assembleScriptName}"
86 dir="${buildDirectory}" />
87
88 </target>
89
90 <target name="prePackage" />
91
92
93 <target name="postPackage">
94
95 <property
96 name="archiveName"
97 value="wtp-common-Automated-Tests-${buildLabel}.zip" />
98
99 <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}" />
111 </ant>
112
113 </target>
114
115 <!-- ===================================================================== -->
116 <!-- Check out map files from correct repository -->
117 <!-- Replace values for cvsRoot, package and mapVersionTag as desired. -->
118 <!-- ===================================================================== -->
119 <target
120 name="checkLocal"
121 depends="check.useLocalMaps"
122 if="useLocalMaps">
123 <available
124 property="mapsLocal"
125 file="${buildDirectory}/maps/${env.RELENG}" />
126 </target>
127 <target
128 name="getMapFiles"
129 depends="checkLocal"
130 unless="mapsLocal">
131
132 <!-- *** change the repo info -->
133 <property
134 name="mapCvsRoot"
135 value=":${cvsProtocol}:${cvsUser}@${cvsServer}:${cvsRoot}" />
136
137 <!-- if not otherwise set, assume HEAD -->
138 <property
139 name="mapVersionTag"
140 value="HEAD" />
141
142 <property
143 name="releng.jsf-mapVersionTag"
144 value="HEAD" />
145
146
147 <echo
148 level="info"
149 message="${mapCvsRoot} ${mapVersionTag} ">
150 </echo>
151 <property
152 name="cvsPackage"
153 value="${env.RELENGMAPS}" />
154 <echo
155 level="debug"
156 message="${mapCvsRoot} ${mapVersionTag} " />
157 <echo
158 level="debug"
159 message="cvsPackage = ${cvsPackage} " />
160 <cvs
161 cvsRoot="${mapCvsRoot}"
162 package="${cvsPackage}"
163 dest="${buildDirectory}/maps"
164 tag="${mapVersionTag}"
165 quiet="${env.CVS_QUIET}"
166 reallyquiet="${env.CVS_REALLY_QUIET}" />
167 <!--
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 -->
176
177 <cvs
178 cvsRoot="${mapCvsRoot}"
179 package="${env.RELENGJSF}"
180 dest="${buildDirectory}/maps"
181 tag="${releng.jsf-mapVersionTag}"
182 quiet="${env.CVS_QUIET}"
183 reallyquiet="${env.CVS_REALLY_QUIET}" />
184
185 <!--tag the map files project-->
186 <antcall target="tagMapFiles">
187 <param
188 name="mapCvsRoot"
189 value="${mapCvsRoot}" />
190 </antcall>
191
192 <!-- 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
202 </target>
203
204 <target
205 name="tagMapFiles"
206 if="tagMaps">
207 <cvs
208 cvsRoot="${mapCvsRoot}"
209 dest="${buildDirectory}/maps"
210 command="tag v${buildType}${timestamp}"
211 quiet="${env.CVS_QUIET}"
212 reallyquiet="${env.CVS_REALLY_QUIET}" />
213 </target>
214
215
216 <!-- ===================================================================== -->
217 <!-- Steps to do before setup -->
218 <!-- ===================================================================== -->
219 <target name="preSetup"></target>
220
221 <!-- ===================================================================== -->
222 <!-- Steps to do after setup but before starting the build proper -->
223 <!-- ===================================================================== -->
224 <target name="postSetup">
225 <dirname
226 file="${ant.file}"
227 property="component.dir" />
228 <echo
229 level="debug"
230 message="ant.file: ${ant.file}" />
231 <echo
232 level="debug"
233 message="component.dir: ${component.dir}" />
234
235 <ant
236 antfile="${component.dir}/dependency.xml"
237 target="get">
238 <property
239 name="dependency.properties"
240 value="${buildDirectory}/maps/${env.RELENG}/maps/dependencies.properties" />
241 <property
242 name="base.install.dir"
243 value="${buildRoot}" />
244 </ant>
245
246 </target>
247
248 <!-- ===================================================================== -->
249 <!-- Steps to do before fetching the build elements -->
250 <!-- ===================================================================== -->
251 <target name="preFetch"></target>
252
253 <!-- ===================================================================== -->
254 <!-- Steps to do after fetching the build elements -->
255 <!-- ===================================================================== -->
256 <target name="postFetch"></target>
257
258 <!-- ===================================================================== -->
259 <!-- Steps to do before generating the build scripts. -->
260 <!-- ===================================================================== -->
261 <target name="postGenerate">
262 <customizeAccessRules
263 bundleDirectory="${buildDirectory}/plugins"/>
264 </target>
265 <!-- ===================================================================== -->
266 <!-- Steps to do after generating the build scripts. -->
267 <!-- ===================================================================== -->
268 <target name="preGenerate"></target>
269
270
271 <!-- ===================================================================== -->
272 <!-- Steps to do before running the build.xmls for the elements being built. -->
273 <!-- ===================================================================== -->
274 <target name="preProcess"></target>
275
276 <!-- ===================================================================== -->
277 <!-- Steps to do after running the build.xmls for the elements being built. -->
278 <!-- ===================================================================== -->
279 <target name="postProcess">
280 <condition property="logsAvailable">
281 <istrue value="${javacVerbose}" />
282 </condition>
283 <antcall target="gatherLogs" />
284 </target>
285
286
287 <!-- ===================================================================== -->
288 <!-- Steps to do before running assemble. -->
289 <!-- ===================================================================== -->
290 <target name="preAssemble"></target>
291
292 <!-- ===================================================================== -->
293 <!-- Steps to do after running assemble. -->
294 <!-- ===================================================================== -->
295 <target name="postAssemble"></target>
296
297 <!-- ===================================================================== -->
298 <!-- Steps to do after the build is done. -->
299 <!-- ===================================================================== -->
300 <target name="postBuild"></target>
301
302
303 <!-- ===================================================================== -->
304 <!-- Steps to test the build results -->
305 <!-- ===================================================================== -->
306 <target name="test"></target>
307
308
309 <!-- ===================================================================== -->
310 <!-- Steps to do to publish the build results -->
311 <!-- ===================================================================== -->
312 <target name="publish"></target>
313
314 <!-- ===================================================================== -->
315 <!-- Helper targets -->
316 <!-- ===================================================================== -->
317 <target
318 name="gatherLogs"
319 if="logsAvailable">
320 <mkdir dir="${buildDirectory}/${buildLabel}/testcompilelogs" />
321 <echo
322 level="debug"
323 message="logExtension: ${logExtension}" />
324 <antcall target="allElements">
325 <param
326 name="target"
327 value="gatherLogs" />
328 <param
329 name="logExtension"
330 value="${logExtension}" />
331 </antcall>
332 <unzip
333 dest="${buildDirectory}/${buildLabel}/testcompilelogs"
334 overwrite="true">
335 <fileset
336 dir="${buildDirectory}/features/org.eclipse.wst.common.tests">
337 <include name="**/*.log.zip" />
338 </fileset>
339 </unzip>
340
341
342
343 </target>
344
345 <target
346 name="clean"
347 unless="noclean">
348 <antcall target="allElements">
349 <param
350 name="target"
351 value="cleanElement" />
352 </antcall>
353 </target>
354
355 <!-- ===================================================================== -->
356 <!-- Default target -->
357 <!-- ===================================================================== -->
358 <target name="noDefault">
359 <echo
360 level="error"
361 message="You must specify a target when invoking this file" />
362 </target>
363
364 <target name="check.useLocalMaps">
365 <condition property="useLocalMaps">
366 <equals
367 arg1="${env.USE_LOCAL_MAPS}"
368 arg2="true" />
369 </condition>
370 </target>
371
372</project>