blob: 8373b3424902c130856b507e68717bc7657a7970 [file] [log] [blame]
david_williamsd913e922006-11-13 07:24:21 +00001<project
2 name="Build specific targets and properties"
3 default="noDefault">
ndaib8cedc82005-09-13 18:00:32 +00004
david_williamsa3e48362007-08-22 04:21:50 +00005 <property environment="env" />
6
david_williams3696f6f2005-12-30 07:59:43 +00007 <!-- ===================================================================== -->
8 <!-- Run a given ${target} on all elements being built -->
9 <!-- Add on <ant> task for each top level element being built. -->
10 <!-- ===================================================================== -->
11 <target name="allElements">
david_williams7913a452007-08-26 02:43:50 +000012 <echo level="info" message="Target:${target} " />
13 <echo level="debug" message="basedir: ${basedir}" />
14 <echo level="debug" message="buildDirectory: ${buildDirectory}" />
15 <echo level="debug" message="baseLocation: ${baseLocation}" />
16 <echo level="debug" message="generic target: ${genericTargets}" />
david_williamsd913e922006-11-13 07:24:21 +000017 <ant
18 antfile="${genericTargets}"
19 target="${target}">
20 <property
21 name="type"
22 value="feature" />
23 <property
24 name="id"
25 value="org.eclipse.wst" />
david_williams3696f6f2005-12-30 07:59:43 +000026 </ant>
27 </target>
ndaib8cedc82005-09-13 18:00:32 +000028
david_williams3696f6f2005-12-30 07:59:43 +000029 <!-- ===================================================================== -->
30 <!-- Targets to assemble the built elements for particular configurations -->
31 <!-- These generally call the generated assemble scripts (named in -->
32 <!-- ${assembleScriptName}) but may also add pre and post processing -->
33 <!-- Add one target for each root element and each configuration -->
34 <!-- ===================================================================== -->
ndaib8cedc82005-09-13 18:00:32 +000035
david_williams3696f6f2005-12-30 07:59:43 +000036 <target name="assemble.org.eclipse.wst">
david_williamsd913e922006-11-13 07:24:21 +000037 <property
38 name="archiveName"
39 value="wtp-wst-${buildLabel}.zip" />
40 <ant
41 antfile="${assembleScriptName}"
42 dir="${buildDirectory}" />
ndaib8cedc82005-09-13 18:00:32 +000043
david_williamsa0aec8e2006-05-23 00:29:00 +000044 </target>
45
46 <target name="prePackage" />
47
48 <target name="postPackage">
david_williamsd913e922006-11-13 07:24:21 +000049 <property
50 name="archiveName"
51 value="wtp-wst-${buildLabel}.zip" />
david_williamsa0aec8e2006-05-23 00:29:00 +000052
david_williamsd913e922006-11-13 07:24:21 +000053 <ant
54 antfile="${wtp.builder.home}/scripts/build/buildutilities.xml"
55 target="unpackUpdateJarsAndCreateZippedPackages">
56 <property
57 name="buildDirectory"
58 value="${buildDirectory}" />
59 <property
60 name="buildLabel"
61 value="${buildLabel}" />
62 <property
63 name="archiveName"
64 value="${archiveName}" />
65 </ant>
david_williams0b74c592007-04-09 06:11:35 +000066
david_williams1cff0e92006-11-23 00:40:29 +000067 <ant
68 antfile="${wtp.builder.home}/scripts/build/buildutilities.xml"
69 target="createChecksums">
70 <property
71 name="buildDirectory"
72 value="${buildDirectory}" />
73 <property
74 name="buildLabel"
75 value="${buildLabel}" />
76 <property
77 name="archiveName"
78 value="${archiveName}" />
79 </ant>
80
81
david_williamsd913e922006-11-13 07:24:21 +000082
david_williams3696f6f2005-12-30 07:59:43 +000083 </target>
ndaib8cedc82005-09-13 18:00:32 +000084
david_williams3696f6f2005-12-30 07:59:43 +000085 <!-- ===================================================================== -->
86 <!-- Check out map files from correct repository -->
87 <!-- Replace values for cvsRoot, package and mapVersionTag as desired. -->
88 <!-- ===================================================================== -->
89 <target name="checkLocal">
david_williamsd913e922006-11-13 07:24:21 +000090 <available
91 property="mapsLocal"
92 file="${buildDirectory}/maps/releng" />
david_williams3696f6f2005-12-30 07:59:43 +000093 </target>
david_williamsd913e922006-11-13 07:24:21 +000094 <target
95 name="getMapFiles"
96 depends="checkLocal"
97 unless="mapsLocal">
ndaib8cedc82005-09-13 18:00:32 +000098
david_williams3696f6f2005-12-30 07:59:43 +000099 <!-- *** change the repo info -->
david_williamsd913e922006-11-13 07:24:21 +0000100 <property
101 name="mapCvsRoot"
102 value=":${cvsProtocol}:${cvsUser}@${cvsServer}:${cvsRoot}" />
103 <property
104 name="mapVersionTag"
105 value="HEAD" />
david_williams1cff0e92006-11-23 00:40:29 +0000106 <property
107 name="cvsPackage"
108 value="releng" />
david_williams7913a452007-08-26 02:43:50 +0000109 <echo level="debug" message="${mapCvsRoot} ${mapVersionTag} " />
110 <echo level="debug" message="cvsPackage = ${cvsPackage} " />
david_williams1cff0e92006-11-23 00:40:29 +0000111
david_williamsd913e922006-11-13 07:24:21 +0000112 <cvs
113 cvsRoot="${mapCvsRoot}"
david_williams1cff0e92006-11-23 00:40:29 +0000114 package="${cvsPackage}"
david_williamsd913e922006-11-13 07:24:21 +0000115 dest="${buildDirectory}/maps"
david_williamsa3e48362007-08-22 04:21:50 +0000116 tag="${mapVersionTag}"
117 quiet="${env.CVS_QUIET}"
118 reallyquiet="${env.CVS_REALLY_QUIET}" />
david_williams3696f6f2005-12-30 07:59:43 +0000119 <!--tag the map files project-->
120 <antcall target="tagMapFiles">
david_williamsd913e922006-11-13 07:24:21 +0000121 <param
122 name="mapCvsRoot"
123 value="${mapCvsRoot}" />
david_williams3696f6f2005-12-30 07:59:43 +0000124 </antcall>
125 </target>
ndaib8cedc82005-09-13 18:00:32 +0000126
david_williamsd913e922006-11-13 07:24:21 +0000127 <target
128 name="tagMapFiles"
129 if="tagMaps">
130 <cvs
131 cvsRoot="${mapCvsRoot}"
132 dest="${buildDirectory}/maps"
david_williamsa3e48362007-08-22 04:21:50 +0000133 command="tag v${buildType}${timestamp}"
134 quiet="${env.CVS_QUIET}"
135 reallyquiet="${env.CVS_REALLY_QUIET}" />
david_williams3696f6f2005-12-30 07:59:43 +0000136 </target>
ndaib8cedc82005-09-13 18:00:32 +0000137
138
david_williams3696f6f2005-12-30 07:59:43 +0000139 <!-- ===================================================================== -->
140 <!-- Steps to do before setup -->
141 <!-- ===================================================================== -->
david_williamsd913e922006-11-13 07:24:21 +0000142 <target name="preSetup"></target>
ndaib8cedc82005-09-13 18:00:32 +0000143
david_williams3696f6f2005-12-30 07:59:43 +0000144 <!-- ===================================================================== -->
145 <!-- Steps to do after setup but before starting the build proper -->
146 <!-- ===================================================================== -->
147 <target name="postSetup">
david_williamsd913e922006-11-13 07:24:21 +0000148 <dirname
149 file="${ant.file}"
150 property="component.dir" />
david_williams7913a452007-08-26 02:43:50 +0000151 <echo level="debug" message="ant.file: ${ant.file}" />
152 <echo level="debug" message="component.dir: ${component.dir}" />
david_williams1cff0e92006-11-23 00:40:29 +0000153
david_williamsd913e922006-11-13 07:24:21 +0000154 <ant
155 antfile="${component.dir}/dependency.xml"
156 target="get">
157 <property
158 name="dependency.properties"
159 value="${buildDirectory}/maps/releng/maps/dependencies.properties" />
160 <property
161 name="base.install.dir"
162 value="${buildRoot}" />
david_williams3696f6f2005-12-30 07:59:43 +0000163 </ant>
ndaib8cedc82005-09-13 18:00:32 +0000164
david_williamsa3e48362007-08-22 04:21:50 +0000165
166
167
david_williams3696f6f2005-12-30 07:59:43 +0000168 </target>
ndaib8cedc82005-09-13 18:00:32 +0000169
david_williams3696f6f2005-12-30 07:59:43 +0000170 <!-- ===================================================================== -->
171 <!-- Steps to do before fetching the build elements -->
172 <!-- ===================================================================== -->
david_williamsd913e922006-11-13 07:24:21 +0000173 <target name="preFetch"></target>
ndaib8cedc82005-09-13 18:00:32 +0000174
david_williams3696f6f2005-12-30 07:59:43 +0000175 <!-- ===================================================================== -->
176 <!-- Steps to do after fetching the build elements -->
177 <!-- ===================================================================== -->
david_williamsd913e922006-11-13 07:24:21 +0000178 <target name="postFetch"></target>
ndaib8cedc82005-09-13 18:00:32 +0000179
david_williams3696f6f2005-12-30 07:59:43 +0000180 <!-- ===================================================================== -->
181 <!-- Steps to do before generating the build scripts. -->
182 <!-- ===================================================================== -->
david_williams0b74c592007-04-09 06:11:35 +0000183 <target name="postGenerate">
david_williamsa3e48362007-08-22 04:21:50 +0000184 <customizeAccessRules
185 bundleDirectory="${buildDirectory}/plugins"
186 defaultRules="+org/eclipse/wst/**/*, +org/eclipse/jst/**/*" />
david_williams0b74c592007-04-09 06:11:35 +0000187 </target>
ndaib8cedc82005-09-13 18:00:32 +0000188
david_williams3696f6f2005-12-30 07:59:43 +0000189 <!-- ===================================================================== -->
190 <!-- Steps to do after generating the build scripts. -->
191 <!-- ===================================================================== -->
david_williams0b74c592007-04-09 06:11:35 +0000192 <target name="preGenerate"></target>
ndaib8cedc82005-09-13 18:00:32 +0000193
194
david_williams3696f6f2005-12-30 07:59:43 +0000195 <!-- ===================================================================== -->
196 <!-- Steps to do before running the build.xmls for the elements being built. -->
197 <!-- ===================================================================== -->
198 <target name="preProcess">
david_williamsd913e922006-11-13 07:24:21 +0000199 <replace
200 dir="${buildDirectory}/plugins"
201 value="${timestamp}"
202 token="@build@">
david_williams3696f6f2005-12-30 07:59:43 +0000203 <include name="**/about.mappings" />
204 </replace>
205 </target>
ndaib8cedc82005-09-13 18:00:32 +0000206
david_williams3696f6f2005-12-30 07:59:43 +0000207 <!-- ===================================================================== -->
208 <!-- Steps to do after running the build.xmls for the elements being built. -->
209 <!-- ===================================================================== -->
210 <target name="postProcess">
211 <condition property="logsAvailable">
212 <istrue value="${javacVerbose}" />
213 </condition>
david_williamsa3e48362007-08-22 04:21:50 +0000214 <antcall target="gatherLogs" />
david_williams3696f6f2005-12-30 07:59:43 +0000215 </target>
ndaib8cedc82005-09-13 18:00:32 +0000216
217
david_williams3696f6f2005-12-30 07:59:43 +0000218 <!-- ===================================================================== -->
219 <!-- Steps to do before running assemble. -->
220 <!-- ===================================================================== -->
221 <target name="preAssemble">
david_williams3696f6f2005-12-30 07:59:43 +0000222 </target>
ndaib8cedc82005-09-13 18:00:32 +0000223
david_williams3696f6f2005-12-30 07:59:43 +0000224 <!-- ===================================================================== -->
225 <!-- Steps to do after running assemble. -->
226 <!-- ===================================================================== -->
david_williams1cff0e92006-11-23 00:40:29 +0000227 <target name="postAssemble">
228
229 </target>
ndaib8cedc82005-09-13 18:00:32 +0000230
david_williams3696f6f2005-12-30 07:59:43 +0000231 <!-- ===================================================================== -->
232 <!-- Steps to do after the build is done. -->
233 <!-- ===================================================================== -->
david_williams1cff0e92006-11-23 00:40:29 +0000234 <target name="postBuild"></target>
ndaib8cedc82005-09-13 18:00:32 +0000235
david_williams3696f6f2005-12-30 07:59:43 +0000236 <!-- ===================================================================== -->
237 <!-- Steps to do to test the build results -->
238 <!-- ===================================================================== -->
david_williamsd913e922006-11-13 07:24:21 +0000239 <target name="test"></target>
ndaib8cedc82005-09-13 18:00:32 +0000240
david_williams3696f6f2005-12-30 07:59:43 +0000241 <!-- ===================================================================== -->
242 <!-- Steps to do to publish the build results -->
243 <!-- ===================================================================== -->
david_williamsd913e922006-11-13 07:24:21 +0000244 <target name="publish"></target>
ndaib8cedc82005-09-13 18:00:32 +0000245
david_williams3696f6f2005-12-30 07:59:43 +0000246 <!-- ===================================================================== -->
247 <!-- Helper targets -->
248 <!-- ===================================================================== -->
david_williamsd913e922006-11-13 07:24:21 +0000249 <target
250 name="gatherLogs"
251 if="logsAvailable">
david_williams3696f6f2005-12-30 07:59:43 +0000252 <mkdir dir="${buildDirectory}/${buildLabel}/compilelogs" />
david_williams7913a452007-08-26 02:43:50 +0000253 <echo level="debug" message="logExtension: ${logExtension}" />
david_williams3696f6f2005-12-30 07:59:43 +0000254 <antcall target="allElements">
david_williamsd913e922006-11-13 07:24:21 +0000255 <param
256 name="target"
257 value="gatherLogs" />
david_williams0b74c592007-04-09 06:11:35 +0000258 <param
259 name="logExtension"
260 value="${logExtension}" />
david_williams3696f6f2005-12-30 07:59:43 +0000261 </antcall>
david_williamsd913e922006-11-13 07:24:21 +0000262 <unzip
263 dest="${buildDirectory}/${buildLabel}/compilelogs"
264 overwrite="true">
david_williams3696f6f2005-12-30 07:59:43 +0000265 <fileset dir="${buildDirectory}/features/org.eclipse.wst">
david_williams0bcf3432006-09-02 02:58:30 +0000266 <include name="**/*.log.zip" />
david_williams3696f6f2005-12-30 07:59:43 +0000267 </fileset>
268 </unzip>
david_williamsd757a552006-09-12 06:29:01 +0000269
david_williams0b74c592007-04-09 06:11:35 +0000270
david_williams295dfa92006-09-11 14:47:51 +0000271 <!-- workaround: see https://bugs.eclipse.org/bugs/show_bug.cgi?id=156043 -->
david_williamsd913e922006-11-13 07:24:21 +0000272 <copy
273 todir="${buildDirectory}/${buildLabel}/compilelogs"
274 overwrite="true">
275 <fileset
276 dir="${buildDirectory}/features/org.eclipse.wst.common_ui.feature/feature.temp.folder" />
david_williams295dfa92006-09-11 14:47:51 +0000277 </copy>
david_williamsd913e922006-11-13 07:24:21 +0000278
279 <copy
280 todir="${buildDirectory}/${buildLabel}/compilelogs"
281 overwrite="true">
282 <fileset
283 dir="${buildDirectory}/features/org.eclipse.wst.server_ui.feature/feature.temp.folder" />
david_williams295dfa92006-09-11 14:47:51 +0000284 </copy>
david_williamsd913e922006-11-13 07:24:21 +0000285
286 <copy
287 todir="${buildDirectory}/${buildLabel}/compilelogs"
288 overwrite="true">
289 <fileset
290 dir="${buildDirectory}/features/org.eclipse.wst.xml_ui.feature/feature.temp.folder" />
david_williams295dfa92006-09-11 14:47:51 +0000291 </copy>
david_williamsd913e922006-11-13 07:24:21 +0000292
293 <copy
294 todir="${buildDirectory}/${buildLabel}/compilelogs"
295 overwrite="true">
296 <fileset
297 dir="${buildDirectory}/features/org.eclipse.wst.ws_ui.feature/feature.temp.folder" />
david_williams295dfa92006-09-11 14:47:51 +0000298 </copy>
david_williamsd913e922006-11-13 07:24:21 +0000299
300 <copy
301 todir="${buildDirectory}/${buildLabel}/compilelogs"
302 overwrite="true">
303 <fileset
304 dir="${buildDirectory}/features/org.eclipse.wst.web_ui.feature/feature.temp.folder" />
david_williams295dfa92006-09-11 14:47:51 +0000305 </copy>
david_williamsd913e922006-11-13 07:24:21 +0000306
david_williams3696f6f2005-12-30 07:59:43 +0000307 </target>
308
david_williamsd913e922006-11-13 07:24:21 +0000309 <target
310 name="clean"
311 unless="noclean">
david_williams3696f6f2005-12-30 07:59:43 +0000312 <antcall target="allElements">
david_williamsd913e922006-11-13 07:24:21 +0000313 <param
314 name="target"
315 value="cleanElement" />
david_williams3696f6f2005-12-30 07:59:43 +0000316 </antcall>
317 </target>
318
319 <!-- ===================================================================== -->
320 <!-- Default target -->
321 <!-- ===================================================================== -->
322 <target name="noDefault">
david_williams7913a452007-08-26 02:43:50 +0000323 <echo level="error"
david_williamsa3e48362007-08-22 04:21:50 +0000324 message="You must specify a target when invoking this file" />
david_williams3696f6f2005-12-30 07:59:43 +0000325 </target>
ndaib8cedc82005-09-13 18:00:32 +0000326
327</project>