blob: 730db5de27d63d5882660eed1680c73576b34ed9 [file] [log] [blame]
david_williams26f3a5f2008-03-07 22:56:23 +00001<project
2 name="PDECustomTargets"
3 default="noDefault"
4 basedir=".">
5
6 <property
7 name="patchFeature"
8 value="org.eclipse.wtp.patch.tests.assembly.feature" />
9
10
11
12 <!-- = = = standard properties pattern = = = -->
13
14 <!--
15 Note to be cross-platform, "environment variables" are only appropriate for
16 some variables, e.g. ones we set, since properties are case sensitive, even if
17 the environment variables on your operating system are not, e.g. it will
18 be ${env.Path} not ${env.PATH} on Windows -->
19 <property environment="env" />
20
21 <!--
22 Let users override standard properties, if desired.
23 If directory, file, or some properties do not exist,
24 then standard properties will be used.
25 -->
26 <property
27 file="${env.LOCAL_BUILD_PROPERTIES_DIR}/${ant.project.name}.properties" />
28
29 <!-- let this project specify properties, if not already set -->
30 <property file="build.properties" />
31
32
33 <property
34 name="cvsProtocol"
35 value="${env.BUILD_CVS_WRITE_PROTOCOL}" />
36 <property
37 name="cvsUser"
38 value="${env.BUILD_CVS_WRITE_USER}" />
39 <property
40 name="cvsServer"
41 value="${env.BUILD_CVS_SERVER}" />
42 <property
43 name="cvsRoot"
44 value="${env.BUILD_CVS_ROOT}" />
45
46
47 <!-- ===================================================================== -->
48 <!-- Run a given ${target} on all elements being built -->
49 <!-- Add on <ant> task for each top level element being built. -->
50 <!-- ===================================================================== -->
51 <target name="allElements">
52 <echo
53 level="info"
54 message="Target:${target} " />
55 <echo
56 level="debug"
57 message="basedir: ${basedir}" />
58 <echo
59 level="debug"
60 message="component: ${component}" />
61 <echo
62 level="debug"
63 message="buildDirectory: ${buildDirectory}" />
64 <echo
65 level="debug"
66 message="baseLocation: ${baseLocation}" />
67 <ant
68 antfile="${genericTargets}"
69 target="${target}">
70 <property
71 name="type"
72 value="feature" />
73 <property
74 name="id"
75 value="${patchFeature}" />
76 </ant>
77 </target>
78
79 <!-- ===================================================================== -->
80 <!-- Targets to assemble the built elements for particular configurations -->
81 <!-- These generally call the generated assemble scripts (named in -->
82 <!-- ${assembleScriptName}) but may also add pre and post processing -->
83 <!-- Add one target for each root element and each configuration -->
84 <!-- ===================================================================== -->
85
86 <target
87 name="assemble.org.eclipse.wtp.patch.tests.assembly.feature">
88 <property
89 name="archiveName"
90 value="wtp-patches-tests-${buildLabel}.zip" />
91 <ant
92 antfile="${assembleScriptName}"
93 dir="${buildDirectory}" />
94 </target>
95
96 <target name="prePackage" />
97
98
99 <target name="postPackage">
100 <property
101 name="archiveName"
102 value="wtp-patches-tests-${buildLabel}.zip" />
103
104 <ant
105 antfile="${wtp.builder.home}/scripts/build/buildutilities.xml"
106 target="unpackUpdateJarsAndCreateZippedPackages">
107 <property
108 name="buildDirectory"
109 value="${buildDirectory}" />
110 <property
111 name="buildLabel"
112 value="${buildLabel}" />
113 <property
114 name="archiveName"
115 value="${archiveName}" />
116 </ant>
117
118 </target>
119
120 <!-- ===================================================================== -->
121 <!-- Check out map files from correct repository -->
122 <!-- Replace values for cvsRoot, package and mapVersionTag as desired. -->
123 <!-- ===================================================================== -->
124 <target
125 name="checkLocal"
126 depends="check.useLocalMaps"
127 if="useLocalMaps">
128 <available
129 property="mapsLocal"
130 file="${buildDirectory}/maps/${env.RELENG}" />
131 </target>
132 <target
133 name="getMapFiles"
134 depends="checkLocal"
135 unless="mapsLocal">
136
137 <!-- *** change the repo info -->
138 <property
139 name="mapCvsRoot"
140 value=":${cvsProtocol}:${cvsUser}@${cvsServer}:${cvsRoot}" />
141 <property
142 name="mapVersionTag"
143 value="HEAD" />
144 <property
145 name="cvsPackage"
146 value="${env.RELENGMAPS}" />
147 <echo
148 level="debug"
149 message="${mapCvsRoot} ${mapVersionTag} " />
150 <echo
151 level="debug"
152 message="cvsPackage = ${cvsPackage} " />
153 <cvs
154 cvsRoot="${mapCvsRoot}"
155 package="${cvsPackage}"
156 dest="${buildDirectory}/maps"
157 tag="${mapVersionTag}"
158 quiet="${env.CVS_QUIET}"
159 reallyquiet="${env.CVS_REALLY_QUIET}" />
160 <!--
161 <cvs
162 cvsRoot="${mapCvsRoot}"
163 package="${env.RELENGMAPS}"
164 dest="${buildDirectory}/maps"
165 tag="${mapVersionTag}"
166 quiet="${env.CVS_QUIET}"
167 reallyquiet="${env.CVS_REALLY_QUIET}" />
168 -->
169 <!--tag the map files project-->
170 <antcall target="tagMapFiles">
171 <param
172 name="mapCvsRoot"
173 value="${mapCvsRoot}" />
174 </antcall>
175
176 <!-- copy all maps to the same place. Be sure to copy only "maps", as there may be "dependancies" etc,
177 that could be out of date -->
178 <!-- turns out this "one flat directory" appears not needed!
179 <copy todir="${buildDirectory}/maps/${env.RELENG}/maps" flatten="true">
180 <fileset dir="${buildDirectory}/maps/">
181 <include name="**/*.map" />
182 </fileset>
183 </copy>
184 -->
185
186 </target>
187
188 <target
189 name="tagMapFiles"
190 if="tagMaps">
191 <cvs
192 cvsRoot="${mapCvsRoot}"
193 dest="${buildDirectory}/maps"
194 command="tag v${buildType}${timestamp}"
195 quiet="${env.CVS_QUIET}"
196 reallyquiet="${env.CVS_REALLY_QUIET}" />
197 </target>
198
199
200 <!-- ===================================================================== -->
201 <!-- Steps to do before setup -->
202 <!-- ===================================================================== -->
203 <target name="preSetup"></target>
204
205 <!-- ===================================================================== -->
206 <!-- Steps to do after setup but before starting the build proper -->
207 <!-- ===================================================================== -->
208 <target name="postSetup">
209 <dirname
210 file="${ant.file}"
211 property="component.dir" />
212 <echo
213 level="debug"
214 message="ant.file: ${ant.file}" />
215 <echo
216 level="debug"
217 message="component.dir: ${component.dir}" />
218
219 <ant
220 antfile="${component.dir}/dependency.xml"
221 target="get">
222 <property
223 name="dependency.properties"
224 value="${buildDirectory}/maps/${env.RELENG}/maps/dependencies.properties" />
225 <property
226 name="base.install.dir"
227 value="${buildRoot}" />
228 </ant>
229 <!--fetch the additional pieces to build wst tests -->
230 <!--
231 <property
232 name="featureOnly"
233 value="false" />
234 <property
235 name="featureAndPlugins"
236 value="true" />
237 <property
238 name="featuresRecursively"
239 value="true" />
240 <ant
241 antfile="genericTargets.xml"
242 dir="${pde.build.scripts}"
243 target="fetchElement">
244 <property
245 name="type"
246 value="feature" />
247 <property
248 name="id"
249 value="org.eclipse.wst" />
250 </ant>
251 -->
252 </target>
253
254 <!-- ===================================================================== -->
255 <!-- Steps to do before fetching the build elements -->
256 <!-- ===================================================================== -->
257 <target name="preFetch"></target>
258
259 <!-- ===================================================================== -->
260 <!-- Steps to do after fetching the build elements -->
261 <!-- ===================================================================== -->
262 <target name="postFetch"></target>
263
264 <!-- ===================================================================== -->
265 <!-- Steps to do before generating the build scripts. -->
266 <!-- ===================================================================== -->
267 <target name="postGenerate"></target>
268 <!-- ===================================================================== -->
269 <!-- Steps to do after generating the build scripts. -->
270 <!-- ===================================================================== -->
271 <target name="preGenerate"></target>
272
273
274 <!-- ===================================================================== -->
275 <!-- Steps to do before running the build.xmls for the elements being built. -->
276 <!-- ===================================================================== -->
277 <target name="preProcess"></target>
278
279 <!-- ===================================================================== -->
280 <!-- Steps to do after running the build.xmls for the elements being built. -->
281 <!-- ===================================================================== -->
282 <target name="postProcess">
283
284 <condition property="logsAvailable">
285 <istrue value="${javacVerbose}" />
286 </condition>
287 <antcall target="gatherLogs" />
288
289 </target>
290
291
292 <!-- ===================================================================== -->
293 <!-- Steps to do before running assemble. -->
294 <!-- ===================================================================== -->
295 <target name="preAssemble"></target>
296
297 <!-- ===================================================================== -->
298 <!-- Steps to do after running assemble. -->
299 <!-- ===================================================================== -->
300 <target name="postAssemble"></target>
301
302 <!-- ===================================================================== -->
303 <!-- Steps to do after the build is done. -->
304 <!-- ===================================================================== -->
305 <target name="postBuild"></target>
306
307
308
309 <!-- ===================================================================== -->
310 <!-- Steps to test the build results -->
311 <!-- ===================================================================== -->
312 <target name="test"></target>
313
314 <!-- ===================================================================== -->
315 <!-- Steps to do to publish the build results -->
316 <!-- ===================================================================== -->
317 <target name="publish"></target>
318 <!-- ===================================================================== -->
319 <!-- Helper targets -->
320 <!-- ===================================================================== -->
321 <target
322 name="gatherLogs"
323 if="logsAvailable">
324 <mkdir dir="${buildDirectory}/${buildLabel}/testcompilelogs" />
325 <echo
326 level="debug"
327 message="logExtension: ${logExtension}" />
328 <antcall target="allElements">
329 <param
330 name="target"
331 value="gatherLogs" />
332 <param
333 name="logExtension"
334 value="${logExtension}" />
335
336 </antcall>
337 <unzip
338 dest="${buildDirectory}/${buildLabel}/testcompilelogs"
339 overwrite="true">
340 <fileset dir="${buildDirectory}/features/${patchFeature}">
341 <include name="**/*.log.zip" />
342 </fileset>
343 </unzip>
344
345
346 </target>
347
348 <target
349 name="clean"
350 unless="noclean">
351 <antcall target="allElements">
352 <param
353 name="target"
354 value="cleanElement" />
355 </antcall>
356 </target>
357 <!-- ===================================================================== -->
358 <!-- Default target -->
359 <!-- ===================================================================== -->
360 <target name="noDefault">
361 <echo
362 level="error"
363 message="You must specify a target when invoking this file" />
364 </target>
365 <target name="check.useLocalMaps">
366 <condition property="useLocalMaps">
367 <equals
368 arg1="${env.USE_LOCAL_MAPS}"
369 arg2="true" />
370 </condition>
371 </target>
372</project>