blob: eb76143c1e26623af6ebcd1ac715369d11f98e04 [file] [log] [blame]
david_williamsd913e922006-11-13 07:24:21 +00001<project
2 name="Build specific targets and properties"
3 default="noDefault">
ndai91f5c9b2006-03-12 13:56:45 +00004
david_williamsd913e922006-11-13 07:24:21 +00005 <!-- ===================================================================== -->
6 <!-- Run a given ${target} on all elements being built -->
7 <!-- Add on <ant> task for each top level element being built. -->
8 <!-- ===================================================================== -->
9 <target name="allElements">
10 <echo message="Target: ${target} " />
11 <echo message="basedir: ${basedir}" />
david_williamsd913e922006-11-13 07:24:21 +000012 <echo message="buildDirectory: ${buildDirectory}" />
13 <echo message="baseLocation: ${baseLocation}" />
14 <echo message="generic target: ${genericTargets}" />
15 <ant
16 antfile="${genericTargets}"
17 target="${target}">
18 <property
19 name="type"
20 value="feature" />
21 <property
22 name="id"
23 value="org.eclipse.jpa.tests" />
24 </ant>
25 </target>
ndai91f5c9b2006-03-12 13:56:45 +000026
david_williamsd913e922006-11-13 07:24:21 +000027 <!-- ===================================================================== -->
28 <!-- Targets to assemble the built elements for particular configurations -->
29 <!-- These generally call the generated assemble scripts (named in -->
30 <!-- ${assembleScriptName}) but may also add pre and post processing -->
31 <!-- Add one target for each root element and each configuration -->
32 <!-- ===================================================================== -->
ndai91f5c9b2006-03-12 13:56:45 +000033
david_williamsd913e922006-11-13 07:24:21 +000034 <target name="assemble.org.eclipse.jpa.tests">
35 <property
36 name="archiveName"
37 value="wtp-jpa-Automated-Tests-${buildLabel}.zip" />
38 <ant
39 antfile="${assembleScriptName}"
40 dir="${buildDirectory}" />
ndai91f5c9b2006-03-12 13:56:45 +000041
david_williamsd913e922006-11-13 07:24:21 +000042 </target>
ndai91f5c9b2006-03-12 13:56:45 +000043
david_williamsd913e922006-11-13 07:24:21 +000044 <target name="prePackage" />
ndai91f5c9b2006-03-12 13:56:45 +000045
46
david_williamsd913e922006-11-13 07:24:21 +000047 <target name="postPackage">
48 <property
49 name="archiveName"
50 value="wtp-jpa-Automated-Tests-${buildLabel}.zip" />
51
52 <ant
53 antfile="${wtp.builder.home}/scripts/build/buildutilities.xml"
54 target="unpackUpdateJarsAndCreateZippedPackages">
55 <property
56 name="buildDirectory"
57 value="${buildDirectory}" />
58 <property
59 name="buildLabel"
60 value="${buildLabel}" />
61 <property
62 name="archiveName"
63 value="${archiveName}" />
64 </ant>
65
66 </target>
67
68 <!-- ===================================================================== -->
69 <!-- Check out map files from correct repository -->
70 <!-- Replace values for cvsRoot, package and mapVersionTag as desired. -->
71 <!-- ===================================================================== -->
72 <target name="checkLocal">
73 <available
74 property="mapsLocal"
75 file="${buildDirectory}/maps/releng.dali" />
76 </target>
77
78 <target
79 name="getMapFiles"
80 depends="checkLocal"
81 unless="mapsLocal">
82
ndai91f5c9b2006-03-12 13:56:45 +000083 <!-- *** change the repo info -->
david_williamsd913e922006-11-13 07:24:21 +000084 <property
85 name="mapCvsRoot"
86 value=":${cvsProtocol}:${cvsUser}@${cvsServer}:${cvsRoot}" />
87 <property
88 name="mapVersionTag"
89 value="HEAD" />
90 <property
91 name="cvsPackage"
92 value="releng.dali" />
93 <echo message="${mapCvsRoot} ${mapVersionTag} " />
94 <echo message="cvsPackage = ${cvsPackage} " />
95
96 <cvs
97 cvsRoot="${mapCvsRoot}"
98 package="${cvsPackage}"
99 dest="${buildDirectory}/maps"
100 tag="${mapVersionTag}" />
ndai91f5c9b2006-03-12 13:56:45 +0000101 <!--tag the map files project-->
102 <antcall target="tagMapFiles">
david_williamsd913e922006-11-13 07:24:21 +0000103 <param
104 name="mapCvsRoot"
105 value="${mapCvsRoot}" />
ndai91f5c9b2006-03-12 13:56:45 +0000106 </antcall>
david_williamsd913e922006-11-13 07:24:21 +0000107 </target>
ndai91f5c9b2006-03-12 13:56:45 +0000108
david_williamsd913e922006-11-13 07:24:21 +0000109 <target
110 name="tagMapFiles"
111 if="tagMaps">
112 <cvs
113 cvsRoot="${mapCvsRoot}"
114 dest="${buildDirectory}/maps"
115 command="tag v${buildType}${timestamp}" />
116 </target>
ndai91f5c9b2006-03-12 13:56:45 +0000117
david_williamsd913e922006-11-13 07:24:21 +0000118 <!-- ===================================================================== -->
119 <!-- Steps to do before setup -->
120 <!-- ===================================================================== -->
121 <target name="preSetup"></target>
ndai91f5c9b2006-03-12 13:56:45 +0000122
david_williamsd913e922006-11-13 07:24:21 +0000123 <!-- ===================================================================== -->
124 <!-- Steps to do after setup but before starting the build proper -->
125 <!-- ===================================================================== -->
126 <target name="postSetup">
127 <dirname
128 file="${ant.file}"
129 property="component.dir" />
130 <echo message="ant.file: ${ant.file}" />
131 <echo message="component.dir: ${component.dir}" />
ndai91f5c9b2006-03-12 13:56:45 +0000132
david_williamsd913e922006-11-13 07:24:21 +0000133 <ant
134 antfile="${component.dir}/dependency.xml"
135 target="get">
136 <property
137 name="dependency.properties"
138 value="${buildDirectory}/maps/releng/maps/dependencies.properties" />
139 <property
140 name="base.install.dir"
141 value="${buildRoot}" />
142 </ant>
143 <!--fetch the additional pieces to build tests -->
144 <property
145 name="featureOnly"
146 value="false" />
147 <property
148 name="featureAndPlugins"
149 value="true" />
150 <property
151 name="featuresRecursively"
152 value="true" />
ndai91f5c9b2006-03-12 13:56:45 +0000153
david_williamsd913e922006-11-13 07:24:21 +0000154 <ant
155 antfile="${genericTargets}"
156 dir="${pde.build.scripts}"
157 target="fetchElement">
158 <property
159 name="type"
160 value="feature" />
161 <property
162 name="id"
163 value="org.eclipse.jpa.tests" />
164 </ant>
ndai91f5c9b2006-03-12 13:56:45 +0000165
david_williamsd913e922006-11-13 07:24:21 +0000166 <ant
167 antfile="${genericTargets}"
168 dir="${pde.build.scripts}"
169 target="fetchElement">
170 <property
171 name="type"
172 value="feature" />
173 <property
174 name="id"
175 value="org.eclipse.wst" />
176 </ant>
177 <ant
178 antfile="${genericTargets}"
179 dir="${pde.build.scripts}"
180 target="fetchElement">
181 <property
182 name="type"
183 value="feature" />
184 <property
185 name="id"
186 value="org.eclipse.jst" />
187 </ant>
188 </target>
ndai91f5c9b2006-03-12 13:56:45 +0000189
david_williamsd913e922006-11-13 07:24:21 +0000190 <!-- ===================================================================== -->
191 <!-- Steps to do before fetching the build elements -->
192 <!-- ===================================================================== -->
193 <target name="preFetch"></target>
ndai91f5c9b2006-03-12 13:56:45 +0000194
david_williamsd913e922006-11-13 07:24:21 +0000195 <!-- ===================================================================== -->
196 <!-- Steps to do after fetching the build elements -->
197 <!-- ===================================================================== -->
198 <target name="postFetch"></target>
199
200 <!-- ===================================================================== -->
201 <!-- Steps to do before generating the build scripts. -->
202 <!-- ===================================================================== -->
203 <target name="preGenerate"></target>
204
205 <!-- ===================================================================== -->
206 <!-- Steps to do after generating the build scripts. -->
207 <!-- ===================================================================== -->
208 <target name="postGenerate"></target>
ndai91f5c9b2006-03-12 13:56:45 +0000209
210
david_williamsd913e922006-11-13 07:24:21 +0000211 <!-- ===================================================================== -->
212 <!-- Steps to do before running the build.xmls for the elements being built. -->
213 <!-- ===================================================================== -->
214 <target name="preProcess"></target>
ndai91f5c9b2006-03-12 13:56:45 +0000215
david_williamsd913e922006-11-13 07:24:21 +0000216 <!-- ===================================================================== -->
217 <!-- Steps to do after running the build.xmls for the elements being built. -->
218 <!-- ===================================================================== -->
david_williamsc84ab8c2006-12-11 18:50:34 +0000219 <target name="postProcess">
220 <condition property="logsAvailable">
221 <istrue value="${javacVerbose}" />
222 </condition>
223 <antcall target="gatherLogs" />
224
225 </target>
ndai91f5c9b2006-03-12 13:56:45 +0000226
227
david_williamsd913e922006-11-13 07:24:21 +0000228 <!-- ===================================================================== -->
229 <!-- Steps to do before running assemble. -->
230 <!-- ===================================================================== -->
231 <target name="preAssemble"></target>
ndai91f5c9b2006-03-12 13:56:45 +0000232
david_williamsd913e922006-11-13 07:24:21 +0000233 <!-- ===================================================================== -->
234 <!-- Steps to do after running assemble. -->
235 <!-- ===================================================================== -->
236 <target name="postAssemble"></target>
ndai91f5c9b2006-03-12 13:56:45 +0000237
david_williamsd913e922006-11-13 07:24:21 +0000238 <!-- ===================================================================== -->
239 <!-- Steps to do after the build is done. -->
240 <!-- ===================================================================== -->
241 <target name="postBuild"></target>
ndai91f5c9b2006-03-12 13:56:45 +0000242
david_williams518a8692006-04-29 19:34:27 +0000243
david_williamsd913e922006-11-13 07:24:21 +0000244 <!-- ===================================================================== -->
245 <!-- Steps to test the build results -->
246 <!-- ===================================================================== -->
247 <target
248 name="test"
249 unless="dontRunTests">
250 <property
251 name="eclipseAutomatedTestHome"
david_williams4c3b3572006-12-06 04:29:00 +0000252 value="${buildDirectory}/plugins/org.eclipse.jst.jpa.utility.tests" />
ndai91f5c9b2006-03-12 13:56:45 +0000253
david_williamsd913e922006-11-13 07:24:21 +0000254 <echo message="Setting up tests in ${eclipseAutomatedTestHome}" />
ndai91f5c9b2006-03-12 13:56:45 +0000255
david_williamsd913e922006-11-13 07:24:21 +0000256 <copy
257 file="${buildDirectory}/${buildLabel}/wtp-jpa-${buildLabel}.zip"
258 tofile="${eclipseAutomatedTestHome}/eclipse-SDK-wtp-jpa-${buildLabel}.zip" />
259 <copy
260 file="${buildDirectory}/${buildLabel}/wtp-jpa-Automated-Tests-${buildLabel}.zip"
261 tofile="${eclipseAutomatedTestHome}/eclipse-junit-tests-wtp-jpa-${buildLabel}.zip" />
ndai91f5c9b2006-03-12 13:56:45 +0000262
david_williamsd913e922006-11-13 07:24:21 +0000263 <ant
264 antfile="${eclipseAutomatedTestHome}/test.xml"
265 target="run"
266 dir="${eclipseAutomatedTestHome}">
267 <property
268 name="os"
269 value="${baseos}" />
270 <property
271 name="ws"
272 value="${basews}" />
273 <property
274 name="arch"
275 value="${basearch}" />
276 <property
277 name="eclipse-home"
278 value="${baseLocation}" />
279 </ant>
ndai91f5c9b2006-03-12 13:56:45 +0000280
david_williamsd913e922006-11-13 07:24:21 +0000281 </target>
ndai91f5c9b2006-03-12 13:56:45 +0000282
david_williamsd913e922006-11-13 07:24:21 +0000283 <!-- ===================================================================== -->
284 <!-- Steps to do to publish the build results -->
285 <!-- ===================================================================== -->
286 <target name="publish"></target>
287
david_williamsc84ab8c2006-12-11 18:50:34 +0000288
289
290 <!-- ===================================================================== -->
291 <!-- Helper targets -->
292 <!-- ===================================================================== -->
293 <target
294 name="gatherLogs"
295 if="logsAvailable">
296 <mkdir dir="${buildDirectory}/${buildLabel}/testcompilelogs" />
297 <antcall target="allElements">
298 <param
299 name="target"
300 value="gatherLogs" />
301 </antcall>
302
303 <unzip
304 dest="${buildDirectory}/${buildLabel}/testcompilelogs"
305 overwrite="true">
306 <fileset dir="${buildDirectory}/features/org.eclipse.jpa.tests">
307 <include name="**/*.log.zip" />
308 </fileset>
309 </unzip>
310
311
312 </target>
313
314 <target
315 name="clean"
316 unless="noclean">
317 <antcall target="allElements">
318 <param
319 name="target"
320 value="cleanElement" />
321 </antcall>
322 </target>
323
david_williamsd913e922006-11-13 07:24:21 +0000324 <!-- ===================================================================== -->
325 <!-- Default target -->
326 <!-- ===================================================================== -->
327 <target name="noDefault">
328 <echo message="You must specify a target when invoking this file" />
329 </target>
ndai91f5c9b2006-03-12 13:56:45 +0000330
331</project>