blob: 6a851439b220eb532c61276af5aad0af2de988de [file] [log] [blame]
david_williams4b8ab0d2008-01-08 03:56:56 +00001<project
2 name="PDECustomTargets"
3 default="noDefault"
4 basedir=".">
5
david_williams28df8fd2008-07-01 06:25:59 +00006 <!-- = = = standard properties pattern = = =
david_williams4b8ab0d2008-01-08 03:56:56 +00007
david_williams28df8fd2008-07-01 06:25:59 +00008 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" />
david_williams4b8ab0d2008-01-08 03:56:56 +000013
david_williams28df8fd2008-07-01 06:25:59 +000014 <!--
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" />
david_williams4b8ab0d2008-01-08 03:56:56 +000021
david_williams28df8fd2008-07-01 06:25:59 +000022 <!-- let this project specify properties, if not already set -->
23 <property file="build.properties" />
david_williams4b8ab0d2008-01-08 03:56:56 +000024
david_williams28df8fd2008-07-01 06:25:59 +000025 <fail
26 unless="buildDirectory"
27 message="buildDirectory must be set" />
david_williams4b8ab0d2008-01-08 03:56:56 +000028 <echo message="buildDirectory: ${buildDirectory}" />
29
david_williams28df8fd2008-07-01 06:25:59 +000030 <property
31 name="cvsProtocol"
32 value="${env.BUILD_CVS_WRITE_PROTOCOL}" />
33 <property
34 name="cvsUser"
35 value="${env.BUILD_CVS_WRITE_USER}" />
36 <property
37 name="cvsServer"
38 value="${env.BUILD_CVS_SERVER}" />
39 <property
40 name="cvsRoot"
41 value="${env.BUILD_CVS_ROOT}" />
42
43 <!--
44 Run a given ${target} on all elements being built
45 Add on <ant> task for each top level element being built.
46 -->
david_williams4b8ab0d2008-01-08 03:56:56 +000047 <target name="allElements">
48 <echo
49 level="info"
50 message="Target:${target} " />
51 <echo
52 level="debug"
53 message="basedir: ${basedir}" />
54 <echo
david_williams28df8fd2008-07-01 06:25:59 +000055 level="info"
david_williams4b8ab0d2008-01-08 03:56:56 +000056 message="component: ${component}" />
57 <echo
58 level="debug"
59 message="buildDirectory: ${buildDirectory}" />
60 <echo
61 level="debug"
62 message="baseLocation: ${baseLocation}" />
63 <echo
64 level="debug"
65 message="generic target: ${genericTargets}" />
david_williams28df8fd2008-07-01 06:25:59 +000066 <echo
67 message="compilerArg: ${compilerArg}" />
68 <echo
69 message="individualSourceBundles: ${individualSourceBundles}" />
david_williams4b8ab0d2008-01-08 03:56:56 +000070 <ant
71 antfile="${genericTargets}"
72 target="${target}">
73 <property
74 name="type"
75 value="feature" />
76 <property
77 name="id"
78 value="org.eclipse.wst.xsl.feature" />
79 </ant>
80 </target>
81
david_williams28df8fd2008-07-01 06:25:59 +000082 <!--
83 Targets to assemble the built elements for particular configurations
84 These generally call the generated assemble scripts (named in
85 ${assembleScriptName}) but may also add pre and post processing
86 Add one target for each root element and each configuration
87 -->
david_williams4b8ab0d2008-01-08 03:56:56 +000088
89 <target name="assemble.org.eclipse.wst.xsl.feature">
90 <property
91 name="archiveName"
david_williams28df8fd2008-07-01 06:25:59 +000092 value="wtp-xsl-${buildLabel}.zip" />
david_williams4b8ab0d2008-01-08 03:56:56 +000093 <ant
94 antfile="${assembleScriptName}"
95 dir="${buildDirectory}" />
96
97 </target>
98
99 <target name="prePackage" />
100
101 <target name="postPackage">
david_williams28df8fd2008-07-01 06:25:59 +0000102
david_williams4b8ab0d2008-01-08 03:56:56 +0000103 <property
104 name="archiveName"
david_williams28df8fd2008-07-01 06:25:59 +0000105 value="wtp-xsl-${buildLabel}.zip" />
david_williams4b8ab0d2008-01-08 03:56:56 +0000106
107 <ant
108 antfile="${wtp.builder.home}/scripts/build/buildutilities.xml"
109 target="unpackUpdateJarsAndCreateZippedPackages">
110 <property
111 name="buildDirectory"
112 value="${buildDirectory}" />
113 <property
114 name="buildLabel"
115 value="${buildLabel}" />
116 <property
117 name="archiveName"
118 value="${archiveName}" />
119 </ant>
120
david_williams28df8fd2008-07-01 06:25:59 +0000121 </target>
122
123 <!--
124 Check out map files from repository
125 -->
126 <target name="getMapFiles">
127
david_williamsd15372c2008-07-03 06:57:55 +0000128 <ant
129 antfile="${wtp.builder.home}/scripts/build/maptasks.xml"
130 target="maputil">
131 <property
132 name="mapcomponent"
david_williams2cfb0f42008-07-04 07:19:21 +0000133 value="${env.RELENG}"/>
134 <property
135 name="mapTag"
136 value="${mapVersionTag}"/>
137 </ant>
138
139 <ant
140 antfile="${wtp.builder.home}/scripts/build/maptasks.xml"
141 target="maputil">
142 <property
143 name="mapcomponent"
david_williamsd15372c2008-07-03 06:57:55 +0000144 value="${env.RELENGINCUBATOR}"/>
145 <property
146 name="mapTag"
147 value="${mapVersionTag}"/>
148 </ant>
david_williams4b8ab0d2008-01-08 03:56:56 +0000149
150 </target>
151
david_williams4b8ab0d2008-01-08 03:56:56 +0000152
david_williams28df8fd2008-07-01 06:25:59 +0000153 <!--
154 Steps to do before setup
155 -->
david_williams4b8ab0d2008-01-08 03:56:56 +0000156 <target name="preSetup"></target>
157
david_williams28df8fd2008-07-01 06:25:59 +0000158 <!--
159 Steps to do after setup but before starting the build proper
160 -->
david_williams4b8ab0d2008-01-08 03:56:56 +0000161 <target name="postSetup">
162 <dirname
163 file="${ant.file}"
164 property="component.dir" />
165 <echo
166 level="debug"
167 message="ant.file: ${ant.file}" />
168 <echo
169 level="debug"
170 message="component.dir: ${component.dir}" />
171
172 <ant
173 antfile="${component.dir}/dependency.xml"
174 target="get">
175 <property
176 name="dependency.properties"
177 value="${buildDirectory}/maps/${env.RELENG}/maps/dependencies.properties" />
178 <property
179 name="base.install.dir"
180 value="${buildRoot}" />
181 </ant>
david_williams4b8ab0d2008-01-08 03:56:56 +0000182 </target>
183
david_williams28df8fd2008-07-01 06:25:59 +0000184 <!--
185 Steps to do before fetching the build elements
186 -->
david_williams4b8ab0d2008-01-08 03:56:56 +0000187 <target name="preFetch"></target>
188
david_williams28df8fd2008-07-01 06:25:59 +0000189 <!--
190 Steps to do after fetching the build elements
191 -->
david_williams4b8ab0d2008-01-08 03:56:56 +0000192 <target name="postFetch"></target>
193
david_williams28df8fd2008-07-01 06:25:59 +0000194 <!--
195 Steps to do before generating the build scripts.
196 -->
197 <target name="preGenerate"></target>
198
199 <!--
200 Steps to do after generating the build scripts.
201 -->
david_williams4b8ab0d2008-01-08 03:56:56 +0000202 <target name="postGenerate">
203 <echo message="buildDirectory: ${buildDirectory}" />
david_williams28df8fd2008-07-01 06:25:59 +0000204 <customizeAccessRules
david_williams4b8ab0d2008-01-08 03:56:56 +0000205 bundleDirectory="${buildDirectory}/plugins"
206 defaultRules="+org/eclipse/wst/**/*, +org/eclipse/jst/**/*" />
207 </target>
208
david_williams4b8ab0d2008-01-08 03:56:56 +0000209
210
david_williams28df8fd2008-07-01 06:25:59 +0000211 <!--
212 Steps to do before running the build.xmls for the elements being built.
213 -->
david_williams4b8ab0d2008-01-08 03:56:56 +0000214 <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
david_williams28df8fd2008-07-01 06:25:59 +0000223 <!--
224 Steps to do after running the build.xmls for the elements being built.
225 -->
david_williams4b8ab0d2008-01-08 03:56:56 +0000226 <target name="postProcess">
227 <condition property="logsAvailable">
228 <istrue value="${javacVerbose}" />
229 </condition>
230 <antcall target="gatherLogs" />
231 </target>
232
233
david_williams28df8fd2008-07-01 06:25:59 +0000234 <!--
235 Steps to do before running assemble.
236 -->
237 <target name="preAssemble"></target>
david_williams4b8ab0d2008-01-08 03:56:56 +0000238
david_williams28df8fd2008-07-01 06:25:59 +0000239 <!--
240 Steps to do after running assemble.
241 -->
242 <target name="postAssemble"></target>
david_williams4b8ab0d2008-01-08 03:56:56 +0000243
david_williams28df8fd2008-07-01 06:25:59 +0000244 <!--
245 Steps to do after the build is done.
246 -->
david_williams4b8ab0d2008-01-08 03:56:56 +0000247 <target name="postBuild"></target>
248
david_williams28df8fd2008-07-01 06:25:59 +0000249 <!--
250 Steps to do to test the build results
251 -->
david_williams4b8ab0d2008-01-08 03:56:56 +0000252 <target name="test"></target>
253
david_williams28df8fd2008-07-01 06:25:59 +0000254 <!--
255 Steps to do to publish the build results
256 -->
david_williams4b8ab0d2008-01-08 03:56:56 +0000257 <target name="publish"></target>
258
david_williams28df8fd2008-07-01 06:25:59 +0000259 <!--
260 Helper targets
261 -->
david_williams4b8ab0d2008-01-08 03:56:56 +0000262 <target
263 name="gatherLogs"
264 if="logsAvailable">
265 <mkdir dir="${buildDirectory}/${buildLabel}/compilelogs" />
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}/compilelogs"
279 overwrite="true">
david_williams28df8fd2008-07-01 06:25:59 +0000280 <fileset
281 dir="${buildDirectory}/features/org.eclipse.wst.xsl.feature">
david_williams4b8ab0d2008-01-08 03:56:56 +0000282 <include name="**/*.log.zip" />
283 </fileset>
284 </unzip>
285
286 </target>
287
288 <target
289 name="clean"
290 unless="noclean">
291 <antcall target="allElements">
292 <param
293 name="target"
294 value="cleanElement" />
295 </antcall>
296 </target>
297
david_williams28df8fd2008-07-01 06:25:59 +0000298 <!--
299 Default target
300 -->
david_williams4b8ab0d2008-01-08 03:56:56 +0000301 <target name="noDefault">
302 <echo
303 level="error"
304 message="You must specify a target when invoking this file" />
305 </target>
306
david_williams4b8ab0d2008-01-08 03:56:56 +0000307</project>