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