blob: fa04fb2ef623b784a0f7cce6a1537cf0b990a616 [file] [log] [blame]
david_williams5ceb14e2010-03-17 04:30:37 +00001<project
2 name="PDECustomTargets"
3 default="noDefault"
4 basedir=".">
5 <property
6 name="patchFeature"
7 value="org.eclipse.wtp.patch.tests.assembly.feature"/>
8 <!--
9 = = = standard properties pattern = = = Note to be
10 cross-platform, "environment variables" are only appropriate for
11 some variables, e.g. ones we set, since properties are case
12 sensitive, even if the environment variables on your operating
13 system are not, e.g. it will be ${env.Path} not ${env.PATH} on
14 Windows
15 -->
16 <property
17 environment="env"/>
18 <!--
19 Let users override standard properties, if desired. If
20 directory, file, or some properties do not exist, then standard
21 properties will be used.
22 -->
23 <property
24 file="${env.LOCAL_BUILD_PROPERTIES_DIR}/${ant.project.name}.properties"/>
25
26 <!-- let this project specify properties, if not already set -->
27 <property
28 file="build.properties"/>
29 <fail
30 message="dependency.properties must be specified by distribution script"
31 unless="dependency.properties"/>
32 <fail
33 unless="buildDirectory"
34 message="buildDirectory must be set"/>
35 <echo
36 message="buildDirectory: ${buildDirectory}"/>
37 <!--
38 Run a given ${target} on all elements being built Add on <ant>
39 task for each top level element being built.
40 -->
41 <target
42 name="allElements">
43 <echo
44 level="info"
45 message="Target:${target} "/>
46 <echo
47 level="debug"
48 message="basedir: ${basedir}"/>
49 <echo
50 level="info"
51 message="component: ${component}"/>
52 <echo
53 level="debug"
54 message="buildDirectory: ${buildDirectory}"/>
55 <echo
56 level="debug"
57 message="baseLocation: ${baseLocation}"/>
58 <echo
59 level="debug"
60 message="patchFeature: ${patchFeature}"/>
61 <echo
62 message="compilerArg: ${compilerArg}"/>
63 <echo
64 message="individualSourceBundles: ${individualSourceBundles}"/>
65 <ant
66 antfile="${genericTargets}"
67 target="${target}">
68 <property
69 name="type"
70 value="feature"/>
71 <property
72 name="id"
73 value="${patchFeature}"/>
74 </ant>
75 </target>
76 <!--
77 Targets to assemble the built elements for particular
78 configurations These generally call the generated assemble
79 scripts (named in ${assembleScriptName}) but may also add pre
80 and post processing Add one target for each root element and
81 each configuration
82 -->
david_williams05c86602010-03-31 04:31:07 +000083
84 <target
85 name="assemble.org.eclipse.wtp.patch.tests.assembly.feature.p2">
david_williamsb8d1d602010-03-31 04:51:59 +000086 <property
87 name="archiveName"
88 value="wtp-patches-tests-${buildLabel}.zip"/>
89 <ant
90 antfile="${assembleScriptName}"
91 dir="${buildDirectory}"/>
david_williams05c86602010-03-31 04:31:07 +000092 </target>
david_williams777b0f42010-03-31 05:09:48 +000093 <target
david_williamsba576582010-03-31 05:14:26 +000094 name="assemble.org.eclipse.wtp.patch.tests.assembly.feature.group.group.group">
david_williams777b0f42010-03-31 05:09:48 +000095
96 </target>
david_williams5ceb14e2010-03-17 04:30:37 +000097 <target
98 name="assemble.org.eclipse.wtp.patch.tests.assembly.feature">
99 <property
100 name="archiveName"
101 value="wtp-patches-tests-${buildLabel}.zip"/>
102 <ant
103 antfile="${assembleScriptName}"
104 dir="${buildDirectory}"/>
105 </target>
106 <target
107 name="prePackage"/>
108 <target
109 name="postPackage">
110 <property
111 name="archiveName"
112 value="wtp-patches-tests-${buildLabel}.zip"/>
113 <ant
114 antfile="${wtp.builder.home}/scripts/build/buildutilities.xml"
115 target="unpackUpdateJarsAndCreateZippedPackages">
116 <property
117 name="buildDirectory"
118 value="${buildDirectory}"/>
119 <property
120 name="buildLabel"
121 value="${buildLabel}"/>
122 <property
123 name="archiveName"
124 value="${archiveName}"/>
125 </ant>
126 </target>
127
128
129 <!--
130 Check out map files from repository
131 -->
132 <target
133 name="getMapFiles">
134
135 <!-- for now, get all, at once. May componetize later. -->
136 <ant
137 antfile="${wtp.builder.home}/scripts/build/maptasks.xml"
138 target="fetchAllMaps"/>
139 </target>
140
141
142 <!--
143 Steps to do before setup
144 -->
145 <target
146 name="preSetup"></target>
147 <!--
148 Steps to do after setup but before starting the build proper
149 -->
150 <target
151 name="postSetup">
152 <dirname
153 file="${ant.file}"
154 property="component.dir"/>
155 <echo
156 level="debug"
157 message="ant.file: ${ant.file}"/>
158 <echo
159 level="debug"
160 message="component.dir: ${component.dir}"/>
161
162 <!-- Get the dependencies -->
163 <antcall
164 target="getDependencies"/>
165 </target>
166 <!--
167 =====================================================================
168 -->
169 <!-- Get the dependencies based on releng maps -->
170 <!--
171 =====================================================================
172 -->
173 <target
174 name="getDependencies">
175 <ant
176 antfile="${component.dir}/dependency.xml"
177 target="get">
178 <property
179 name="base.install.dir"
180 value="${buildRoot}"/>
181 </ant>
182 </target>
183
184 <!--
185 Steps to do before fetching the build elements
186 -->
187 <target
188 name="preFetch"></target>
189
190 <!--
191 Steps to do after fetching the build elements
192 -->
193 <target
194 name="postFetch"></target>
195
196 <!--
197 Steps to do before generating the build scripts.
198 -->
199 <target
200 name="preGenerate"></target>
201
202 <!--
203 Steps to do after generating the build scripts.
204 -->
205 <target
206 name="postGenerate">
207 <echo
208 message="buildDirectory: ${buildDirectory}"/>
209 <customizeAccessRules
210 bundleDirectory="${buildDirectory}/plugins"
211 defaultRules="+org/eclipse/wst/**/*, +org/eclipse/jst/**/*"/>
212 </target>
213 <!--
214 Steps to do before running the build.xmls for the elements being
215 built.
216 -->
217 <target
218 name="preProcess">
219 <replace
220 dir="${buildDirectory}/plugins"
221 value="${timestamp}"
222 token="@build@">
223 <include
224 name="**/about.mappings"/>
225 </replace>
226 </target>
227 <!--
228 Steps to do after running the build.xmls for the elements being
229 built.
230 -->
231 <target
232 name="postProcess">
233 <condition
234 property="logsAvailable">
235 <istrue
236 value="${javacVerbose}"/>
237 </condition>
238 <antcall
239 target="gatherLogs"/>
240 </target>
241
242 <!--
243 Steps to do before running assemble.
244 -->
245 <target
246 name="preAssemble"></target>
247
248 <!--
249 Steps to do after running assemble.
250 -->
251 <target
252 name="postAssemble"></target>
253
254 <!--
255 Steps to do after the build is done.
256 -->
257 <target
258 name="postBuild"></target>
259
260 <!--
261 Steps to do to test the build results
262 -->
263 <target
264 name="test"></target>
265
266 <!--
267 Steps to do to publish the build results
268 -->
269 <target
270 name="publish"></target>
271
272 <!--
273 Helper targets
274 -->
275 <target
276 name="gatherLogs"
277 if="logsAvailable">
278 <mkdir
279 dir="${buildDirectory}/${buildLabel}/testcompilelogs"/>
280 <echo
281 level="debug"
282 message="logExtension: ${logExtension}"/>
283 <antcall
284 target="allElements">
285 <param
286 name="target"
287 value="gatherLogs"/>
288 <param
289 name="logExtension"
290 value="${logExtension}"/>
291 </antcall>
292 <unzip
293 dest="${buildDirectory}/${buildLabel}/testcompilelogs"
294 overwrite="true">
295 <fileset
296 dir="${buildDirectory}/features/${patchFeature}">
297 <include
298 name="**/*.log.zip"/>
299 </fileset>
300 </unzip>
301 </target>
302 <target
303 name="clean"
304 unless="noclean">
305 <antcall
306 target="allElements">
307 <param
308 name="target"
309 value="cleanElement"/>
310 </antcall>
311 </target>
312
313 <!--
314 Default target
315 -->
316 <target
317 name="noDefault">
318 <echo
319 level="error"
320 message="You must specify a target when invoking this file"/>
321 </target>
322</project>