blob: 035d713913e28265a8bab4ea902dfd533bc63925 [file] [log] [blame]
david_williams5d9c9862007-11-19 04:42:55 +00001<project
david_williams26f83182007-12-09 06:56:43 +00002 name="PDECustomTargets"
3 default="noDefault"
4 basedir=".">
david_williams5d9c9862007-11-19 04:42:55 +00005
david_williams26f83182007-12-09 06:56:43 +00006 <property
7 name="patchFeature"
8 value="org.eclipse.wtp.patch.tests.assembly.feature" />
9
david_williams5d9c9862007-11-19 04:42:55 +000010
david_williams886167e2007-12-13 04:42:37 +000011
david_williams28df8fd2008-07-01 06:25:59 +000012 <!-- = = = standard properties pattern = = =
david_williams886167e2007-12-13 04:42:37 +000013
david_williams886167e2007-12-13 04:42:37 +000014 Note to be cross-platform, "environment variables" are only appropriate for
15 some variables, e.g. ones we set, since properties are case sensitive, even if
16 the environment variables on your operating system are not, e.g. it will
17 be ${env.Path} not ${env.PATH} on Windows -->
18 <property environment="env" />
19
20 <!--
21 Let users override standard properties, if desired.
22 If directory, file, or some properties do not exist,
23 then standard properties will be used.
24 -->
25 <property
26 file="${env.LOCAL_BUILD_PROPERTIES_DIR}/${ant.project.name}.properties" />
27
28 <!-- let this project specify properties, if not already set -->
29 <property file="build.properties" />
30
david_williams28df8fd2008-07-01 06:25:59 +000031 <fail
32 unless="buildDirectory"
33 message="buildDirectory must be set" />
34 <echo message="buildDirectory: ${buildDirectory}" />
david_williams5d9c9862007-11-19 04:42:55 +000035
david_williams28df8fd2008-07-01 06:25:59 +000036 <!--
37 Run a given ${target} on all elements being built
38 Add on <ant> task for each top level element being built.
39 -->
david_williams5d9c9862007-11-19 04:42:55 +000040 <target name="allElements">
david_williams403beae2007-12-09 02:10:40 +000041 <echo
42 level="info"
43 message="Target:${target} " />
44 <echo
45 level="debug"
46 message="basedir: ${basedir}" />
47 <echo
david_williams28df8fd2008-07-01 06:25:59 +000048 level="info"
david_williams403beae2007-12-09 02:10:40 +000049 message="component: ${component}" />
50 <echo
51 level="debug"
52 message="buildDirectory: ${buildDirectory}" />
53 <echo
54 level="debug"
55 message="baseLocation: ${baseLocation}" />
david_williams28df8fd2008-07-01 06:25:59 +000056 <echo
57 level="debug"
58 message="patchFeature: ${patchFeature}" />
59 <echo
60 message="compilerArg: ${compilerArg}" />
61 <echo
62 message="individualSourceBundles: ${individualSourceBundles}" />
david_williams5d9c9862007-11-19 04:42:55 +000063 <ant
64 antfile="${genericTargets}"
65 target="${target}">
66 <property
67 name="type"
68 value="feature" />
69 <property
70 name="id"
71 value="${patchFeature}" />
72 </ant>
73 </target>
74
david_williams28df8fd2008-07-01 06:25:59 +000075 <!--
76 Targets to assemble the built elements for particular configurations
77 These generally call the generated assemble scripts (named in
78 ${assembleScriptName}) but may also add pre and post processing
79 Add one target for each root element and each configuration
80 -->
david_williams5d9c9862007-11-19 04:42:55 +000081
david_williams28df8fd2008-07-01 06:25:59 +000082 <target name="assemble.org.eclipse.wtp.patch.tests.assembly.feature">
david_williams5d9c9862007-11-19 04:42:55 +000083 <property
84 name="archiveName"
85 value="wtp-patches-tests-${buildLabel}.zip" />
86 <ant
87 antfile="${assembleScriptName}"
88 dir="${buildDirectory}" />
89 </target>
90
91 <target name="prePackage" />
92
93
94 <target name="postPackage">
95 <property
96 name="archiveName"
97 value="wtp-patches-tests-${buildLabel}.zip" />
98
99 <ant
100 antfile="${wtp.builder.home}/scripts/build/buildutilities.xml"
101 target="unpackUpdateJarsAndCreateZippedPackages">
102 <property
103 name="buildDirectory"
104 value="${buildDirectory}" />
105 <property
106 name="buildLabel"
107 value="${buildLabel}" />
108 <property
109 name="archiveName"
110 value="${archiveName}" />
111 </ant>
112
david_williams28df8fd2008-07-01 06:25:59 +0000113
david_williams5d9c9862007-11-19 04:42:55 +0000114 </target>
115
david_williams5d9c9862007-11-19 04:42:55 +0000116
david_williams403beae2007-12-09 02:10:40 +0000117 <!--
david_williams28df8fd2008-07-01 06:25:59 +0000118 Check out map files from repository
david_williams403beae2007-12-09 02:10:40 +0000119 -->
david_williams28df8fd2008-07-01 06:25:59 +0000120 <target name="getMapFiles">
david_williams403beae2007-12-09 02:10:40 +0000121
david_williams28df8fd2008-07-01 06:25:59 +0000122 <!-- for now, get all, at once. May componetize later. -->
123
124 <ant
125 antfile="${wtp.builder.home}/scripts/build/maptasks.xml"
126 target="fetchAllMaps" />
david_williams403beae2007-12-09 02:10:40 +0000127
david_williams5d9c9862007-11-19 04:42:55 +0000128 </target>
129
david_williams5d9c9862007-11-19 04:42:55 +0000130
david_williams28df8fd2008-07-01 06:25:59 +0000131 <!--
132 Steps to do before setup
133 -->
david_williams5d9c9862007-11-19 04:42:55 +0000134 <target name="preSetup"></target>
135
david_williams28df8fd2008-07-01 06:25:59 +0000136 <!--
137 Steps to do after setup but before starting the build proper
138 -->
david_williams5d9c9862007-11-19 04:42:55 +0000139 <target name="postSetup">
140 <dirname
141 file="${ant.file}"
142 property="component.dir" />
david_williams403beae2007-12-09 02:10:40 +0000143 <echo
144 level="debug"
145 message="ant.file: ${ant.file}" />
146 <echo
147 level="debug"
148 message="component.dir: ${component.dir}" />
david_williams5d9c9862007-11-19 04:42:55 +0000149
150 <ant
151 antfile="${component.dir}/dependency.xml"
152 target="get">
david_williams592723c2009-11-21 08:02:34 +0000153
154 <property
155 name="env.DEP_DIR"
156 value=""/>
157
david_williams5d9c9862007-11-19 04:42:55 +0000158 <property
159 name="dependency.properties"
david_williamscecc5a92009-09-30 03:17:50 +0000160 value="${buildDirectory}/maps/${env.RELENG}${env.DEP_DIR}/maps/dependencies.properties" />
david_williams5d9c9862007-11-19 04:42:55 +0000161 <property
162 name="base.install.dir"
163 value="${buildRoot}" />
164 </ant>
david_williams28df8fd2008-07-01 06:25:59 +0000165
david_williams5d9c9862007-11-19 04:42:55 +0000166 </target>
167
david_williams28df8fd2008-07-01 06:25:59 +0000168 <!--
169 Steps to do before fetching the build elements
170 -->
david_williams5d9c9862007-11-19 04:42:55 +0000171 <target name="preFetch"></target>
172
david_williams28df8fd2008-07-01 06:25:59 +0000173 <!--
174 Steps to do after fetching the build elements
175 -->
david_williams5d9c9862007-11-19 04:42:55 +0000176 <target name="postFetch"></target>
177
david_williams28df8fd2008-07-01 06:25:59 +0000178 <!--
179 Steps to do before generating the build scripts.
180 -->
david_williams5d9c9862007-11-19 04:42:55 +0000181 <target name="preGenerate"></target>
182
david_williams28df8fd2008-07-01 06:25:59 +0000183 <!--
184 Steps to do after generating the build scripts.
185 -->
186 <target name="postGenerate"></target>
david_williams5d9c9862007-11-19 04:42:55 +0000187
david_williams5d9c9862007-11-19 04:42:55 +0000188
david_williams28df8fd2008-07-01 06:25:59 +0000189 <!--
190 Steps to do before running the build.xmls for the elements being built.
191 -->
192 <target name="preProcess">
193 <replace
194 dir="${buildDirectory}/plugins"
195 value="${timestamp}"
196 token="@build@">
197 <include name="**/about.mappings" />
198 </replace>
199 </target>
200
201 <!--
202 Steps to do after running the build.xmls for the elements being built.
203 -->
david_williams5d9c9862007-11-19 04:42:55 +0000204 <target name="postProcess">
david_williams5d9c9862007-11-19 04:42:55 +0000205 <condition property="logsAvailable">
206 <istrue value="${javacVerbose}" />
207 </condition>
208 <antcall target="gatherLogs" />
david_williams5d9c9862007-11-19 04:42:55 +0000209 </target>
210
david_williams28df8fd2008-07-01 06:25:59 +0000211 <!--
212 Steps to do before running assemble.
213 -->
david_williams5d9c9862007-11-19 04:42:55 +0000214 <target name="preAssemble"></target>
215
david_williams28df8fd2008-07-01 06:25:59 +0000216 <!--
217 Steps to do after running assemble.
218 -->
david_williams5d9c9862007-11-19 04:42:55 +0000219 <target name="postAssemble"></target>
220
david_williams28df8fd2008-07-01 06:25:59 +0000221 <!--
222 Steps to do after the build is done.
223 -->
david_williams5d9c9862007-11-19 04:42:55 +0000224 <target name="postBuild"></target>
225
david_williams28df8fd2008-07-01 06:25:59 +0000226 <!--
227 Steps to do to test the build results
228 -->
david_williams5d9c9862007-11-19 04:42:55 +0000229 <target name="test"></target>
230
david_williams28df8fd2008-07-01 06:25:59 +0000231 <!--
232 Steps to do to publish the build results
233 -->
david_williams5d9c9862007-11-19 04:42:55 +0000234 <target name="publish"></target>
david_williams28df8fd2008-07-01 06:25:59 +0000235
236 <!--
237 Helper targets
238 -->
david_williams5d9c9862007-11-19 04:42:55 +0000239 <target
240 name="gatherLogs"
241 if="logsAvailable">
242 <mkdir dir="${buildDirectory}/${buildLabel}/testcompilelogs" />
david_williams403beae2007-12-09 02:10:40 +0000243 <echo
244 level="debug"
245 message="logExtension: ${logExtension}" />
david_williams5d9c9862007-11-19 04:42:55 +0000246 <antcall target="allElements">
247 <param
248 name="target"
249 value="gatherLogs" />
david_williams803b3cd2007-12-13 07:37:16 +0000250 <param
251 name="logExtension"
252 value="${logExtension}" />
253
david_williams5d9c9862007-11-19 04:42:55 +0000254 </antcall>
255 <unzip
256 dest="${buildDirectory}/${buildLabel}/testcompilelogs"
257 overwrite="true">
david_williams28df8fd2008-07-01 06:25:59 +0000258 <fileset
259 dir="${buildDirectory}/features/${patchFeature}">
david_williams5d9c9862007-11-19 04:42:55 +0000260 <include name="**/*.log.zip" />
261 </fileset>
262 </unzip>
263
264
265 </target>
266
267 <target
268 name="clean"
269 unless="noclean">
270 <antcall target="allElements">
271 <param
272 name="target"
273 value="cleanElement" />
274 </antcall>
275 </target>
david_williams28df8fd2008-07-01 06:25:59 +0000276
277 <!--
278 Default target
279 -->
david_williams5d9c9862007-11-19 04:42:55 +0000280 <target name="noDefault">
david_williams403beae2007-12-09 02:10:40 +0000281 <echo
282 level="error"
david_williams5d9c9862007-11-19 04:42:55 +0000283 message="You must specify a target when invoking this file" />
284 </target>
david_williams28df8fd2008-07-01 06:25:59 +0000285
david_williams5d9c9862007-11-19 04:42:55 +0000286</project>