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