blob: 1efc53752fb5369061475214af3c84bff4a7e65b [file] [log] [blame]
david_williams3696f6f2005-12-30 07:59:43 +00001<project name="Build specific targets and properties"
2 default="noDefault">
ndaib8cedc82005-09-13 18:00:32 +00003
david_williams3696f6f2005-12-30 07:59:43 +00004 <property name="postingDirectory"
5 value="${buildDirectory}" />
ndaib8cedc82005-09-13 18:00:32 +00006
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">
12 <echo message="Target:${target} " />
13 <echo message="basedir: ${basedir}" />
14 <echo message="component: ${component}" />
15 <echo message="buildDirectory: ${buildDirectory}" />
16 <echo message="baseLocation: ${baseLocation}" />
17 <ant antfile="${genericTargets}" target="${target}">
18 <property name="type" value="feature" />
19 <property name="id" value="org.eclipse.jst" />
20 </ant>
21 </target>
ndaib8cedc82005-09-13 18:00:32 +000022
david_williams3696f6f2005-12-30 07:59:43 +000023 <!-- ===================================================================== -->
24 <!-- Targets to assemble the built elements for particular configurations -->
25 <!-- These generally call the generated assemble scripts (named in -->
26 <!-- ${assembleScriptName}) but may also add pre and post processing -->
27 <!-- Add one target for each root element and each configuration -->
28 <!-- ===================================================================== -->
ndaib8cedc82005-09-13 18:00:32 +000029
david_williams3696f6f2005-12-30 07:59:43 +000030 <target name="assemble.org.eclipse.jst">
31 <property name="archiveName"
david_williamsd30a8542006-02-16 07:20:44 +000032 value="wtp-${buildLabel}.zip" />
david_williams3696f6f2005-12-30 07:59:43 +000033 <ant antfile="${assembleScriptName}"
34 dir="${buildDirectory}" />
ndaib8cedc82005-09-13 18:00:32 +000035
david_williams3696f6f2005-12-30 07:59:43 +000036 <mkdir dir="${postingDirectory}/${buildLabel}/checksum" />
david_williamsd30a8542006-02-16 07:20:44 +000037 <checksum file="${postingDirectory}/${buildLabel}/wtp-${buildLabel}.zip"
david_williams3696f6f2005-12-30 07:59:43 +000038 property="md5" />
david_williamsd30a8542006-02-16 07:20:44 +000039 <echo message="${md5} *wtp-${buildLabel}.zip"
40 file="${postingDirectory}/${buildLabel}/checksum/wtp-${buildLabel}.zip.md5" />
david_williamse23cd862005-12-30 08:08:40 +000041 <echo message="${md5}"
david_williamsd30a8542006-02-16 07:20:44 +000042 file="${postingDirectory}/${buildLabel}/checksum/wtp-${buildLabel}.zip.md5antformat" />
david_williams3696f6f2005-12-30 07:59:43 +000043 </target>
ndaib8cedc82005-09-13 18:00:32 +000044
david_williams3696f6f2005-12-30 07:59:43 +000045 <!-- ===================================================================== -->
46 <!-- Check out map files from correct repository -->
47 <!-- Replace values for cvsRoot, package and mapVersionTag as desired. -->
48 <!-- ===================================================================== -->
49 <target name="checkLocal">
50 <available property="mapsLocal"
51 file="${buildDirectory}/maps/releng" />
52 </target>
53 <target name="getMapFiles"
54 depends="checkLocal"
55 unless="mapsLocal">
ndaib8cedc82005-09-13 18:00:32 +000056
david_williams3696f6f2005-12-30 07:59:43 +000057 <!-- *** change the repo info -->
58 <property name="mapCvsRoot"
59 value=":${cvsProtocol}:${cvsUser}@${cvsServer}:${cvsRoot}" />
60 <property name="mapVersionTag" value="HEAD" />
61 <echo message="${mapCvsRoot} ${mapVersionTag} ">
62 </echo>
63 <cvs cvsRoot="${mapCvsRoot}"
64 package="releng"
65 dest="${buildDirectory}/maps"
66 tag="${mapVersionTag}" />
67 <!--tag the map files project-->
68 <antcall target="tagMapFiles">
69 <param name="mapCvsRoot"
70 value="${mapCvsRoot}" />
71 </antcall>
72 </target>
ndaib8cedc82005-09-13 18:00:32 +000073
david_williams3696f6f2005-12-30 07:59:43 +000074 <target name="tagMapFiles" if="tagMaps">
75 <cvs cvsRoot="${mapCvsRoot}"
76 dest="${buildDirectory}/maps"
77 command="tag v${buildType}${timestamp}" />
78 </target>
ndaib8cedc82005-09-13 18:00:32 +000079
80
david_williams3696f6f2005-12-30 07:59:43 +000081 <!-- ===================================================================== -->
82 <!-- Steps to do before setup -->
83 <!-- ===================================================================== -->
84 <target name="preSetup">
85 </target>
ndaib8cedc82005-09-13 18:00:32 +000086
david_williams3696f6f2005-12-30 07:59:43 +000087 <!-- ===================================================================== -->
88 <!-- Steps to do after setup but before starting the build proper -->
89 <!-- ===================================================================== -->
90 <target name="postSetup">
91 <dirname file="${ant.file}"
92 property="component.dir" />
93 <ant antfile="${component.dir}/dependency.xml"
94 target="get">
95 <property name="dependency.properties"
96 value="${buildDirectory}/maps/releng/maps/dependencies.properties" />
97 <property name="base.install.dir"
98 value="${buildRoot}" />
99 </ant>
100 </target>
101
102 <!-- ===================================================================== -->
103 <!-- Steps to do before fetching the build elements -->
104 <!-- ===================================================================== -->
105 <target name="preFetch">
106 </target>
107
108 <!-- ===================================================================== -->
109 <!-- Steps to do after fetching the build elements -->
110 <!-- ===================================================================== -->
111 <target name="postFetch">
112 </target>
113
114 <!-- ===================================================================== -->
115 <!-- Steps to do before generating the build scripts. -->
116 <!-- ===================================================================== -->
117 <target name="preGenerate">
118 </target>
119
120 <!-- ===================================================================== -->
121 <!-- Steps to do after generating the build scripts. -->
122 <!-- ===================================================================== -->
123 <target name="postGenerate">
124 </target>
ndaib8cedc82005-09-13 18:00:32 +0000125
126
david_williams3696f6f2005-12-30 07:59:43 +0000127 <!-- ===================================================================== -->
128 <!-- Steps to do before running the build.xmls for the elements being built. -->
129 <!-- ===================================================================== -->
130 <target name="preProcess">
131 <replace dir="${buildDirectory}/plugins"
132 value="${timestamp}"
133 token="@build@">
134 <include name="**/about.mappings" />
135 </replace>
136 </target>
ndaib8cedc82005-09-13 18:00:32 +0000137
david_williams3696f6f2005-12-30 07:59:43 +0000138 <!-- ===================================================================== -->
139 <!-- Steps to do after running the build.xmls for the elements being built. -->
140 <!-- ===================================================================== -->
141 <target name="postProcess">
142 <condition property="logsAvailable">
143 <istrue value="${javacVerbose}" />
144 </condition>
145 <antcall target="gatherLogs" />
146 </target>
ndaib8cedc82005-09-13 18:00:32 +0000147
ndaib8cedc82005-09-13 18:00:32 +0000148
david_williams3696f6f2005-12-30 07:59:43 +0000149 <!-- ===================================================================== -->
150 <!-- Steps to do before running assemble. -->
151 <!-- ===================================================================== -->
152 <target name="preAssemble">
153 </target>
ndaib8cedc82005-09-13 18:00:32 +0000154
david_williams3696f6f2005-12-30 07:59:43 +0000155 <!-- ===================================================================== -->
156 <!-- Steps to do after running assemble. -->
157 <!-- ===================================================================== -->
158 <target name="postAssemble">
159 </target>
ndaib8cedc82005-09-13 18:00:32 +0000160
david_williams3696f6f2005-12-30 07:59:43 +0000161 <!-- ===================================================================== -->
162 <!-- Steps to do after the build is done. -->
163 <!-- ===================================================================== -->
164 <target name="postBuild">
165 <antcall target="postBuild-${buildType}" />
166 <property name="assemble-all"
167 value="${buildDirectory}/assemble-all" />
168 <unzip dest="${assemble-all}"
david_williamsd30a8542006-02-16 07:20:44 +0000169 src="${postingDirectory}/${buildLabel}/wtp-${buildLabel}.zip"
david_williams3696f6f2005-12-30 07:59:43 +0000170 overwrite="true" />
171 <unzip dest="${assemble-all}"
david_williamsd30a8542006-02-16 07:20:44 +0000172 src="${postingDirectory}/${buildLabel}/wtp-wst-${buildLabel}.zip"
david_williams3696f6f2005-12-30 07:59:43 +0000173 overwrite="true" />
david_williamsd30a8542006-02-16 07:20:44 +0000174 <zip destfile="${postingDirectory}/${buildLabel}/wtp-${buildLabel}.zip"
david_williams3696f6f2005-12-30 07:59:43 +0000175 basedir="${assemble-all}" />
david_williamsd30a8542006-02-16 07:20:44 +0000176 <delete file="${postingDirectory}/${buildLabel}/checksum/wtp-${buildLabel}.zip.md5"
david_williams3696f6f2005-12-30 07:59:43 +0000177 failonerror="false" />
david_williamsd30a8542006-02-16 07:20:44 +0000178 <checksum file="${postingDirectory}/${buildLabel}/wtp-${buildLabel}.zip"
david_williams3696f6f2005-12-30 07:59:43 +0000179 property="md5combined" />
david_williamsd30a8542006-02-16 07:20:44 +0000180 <echo message="${md5combined} *wtp-${buildLabel}.zip"
181 file="${postingDirectory}/${buildLabel}/checksum/wtp-${buildLabel}.zip.md5" />
ndaib8cedc82005-09-13 18:00:32 +0000182
ndaib8cedc82005-09-13 18:00:32 +0000183
ndaib8cedc82005-09-13 18:00:32 +0000184
david_williams3696f6f2005-12-30 07:59:43 +0000185 <!-- create zipped up versions for update site -->
186 <property name="UpdateSiteStagingLocation"
david_williams5730aa42006-04-16 02:56:37 +0000187 value="${buildDirectory}/${buildLabel}/updateSite" />
david_williams3696f6f2005-12-30 07:59:43 +0000188 <antcall target="generateUpdateSite" />
189 </target>
ndaib8cedc82005-09-13 18:00:32 +0000190
david_williams3696f6f2005-12-30 07:59:43 +0000191 <target name="generateUpdateSite">
192 <!-- Create the directory structure -->
193 <mkdir dir="${UpdateSiteStagingLocation}" />
194 <mkdir dir="${UpdateSiteStagingLocation}/features" />
195 <mkdir dir="${UpdateSiteStagingLocation}/plugins" />
196 <!-- Build the jar files -->
197 <antcall target="allElements">
198 <param name="genericTargets"
199 value="${builder}/customTargets.xml" />
200 <param name="target" value="updateSiteExport" />
201 </antcall>
202 <antcall target="copySiteXmlFromCvs" />
203 <antcall target="createNightlyBuildSiteXml" />
204 </target>
205 <target name="updateSiteExport">
206 <ant antfile="build.xml"
207 dir="${buildDirectory}/features/${id}/"
208 target="build.update.jar">
209 <property name="feature.destination"
210 value="${UpdateSiteStagingLocation}/features" />
211 <property name="plugin.destination"
212 value="${UpdateSiteStagingLocation}/plugins" />
213 </ant>
214 </target>
215 <target name="copySiteXmlFromCvs"
216 unless="isNightlyBuild">
217 <!-- connect to CVS and fetch site.xml, copy to ${UpdateSiteStagingLocation}/site.xml afterwards -->
218 </target>
219 <target name="createNightlyBuildSiteXml"
220 if="isNightlyBuild">
221 <!-- create ${UpdateSiteStagingLocation}/site.xml which contains only the nighlty build version -->
222 </target>
ndaib8cedc82005-09-13 18:00:32 +0000223
ndaib8cedc82005-09-13 18:00:32 +0000224
david_williams3696f6f2005-12-30 07:59:43 +0000225 <target name="postBuild-I">
ndaib8cedc82005-09-13 18:00:32 +0000226
david_williams3696f6f2005-12-30 07:59:43 +0000227 </target>
228
229 <target name="postBuild-N">
230 </target>
231
232 <target name="postBuild-M">
233 </target>
234
235 <target name="postBuild-R">
236 </target>
237
238 <target name="postBuild-S">
239 </target>
240
241 <target name="postBuild-T">
242 </target>
243
244 <target name="getEclipseWindows"
245 unless="eclipsefilewin.exists">
246 <get src="${eclipseURL.win32}"
247 dest="${localDownloads}/${eclipseFile.win32}" />
248 </target>
249
250 <!-- ===================================================================== -->
251 <!-- Steps to do to test the build results -->
252 <!-- ===================================================================== -->
253 <target name="test">
254 </target>
255
256 <!-- ===================================================================== -->
257 <!-- Steps to do to publish the build results -->
258 <!-- ===================================================================== -->
259 <target name="publish">
260 </target>
261
262 <!-- ===================================================================== -->
263 <!-- Helper targets -->
264 <!-- ===================================================================== -->
265 <target name="gatherLogs" if="logsAvailable">
266 <mkdir dir="${buildDirectory}/${buildLabel}/compilelogs" />
267 <antcall target="allElements">
268 <param name="target" value="gatherLogs" />
269 </antcall>
270
271 <unzip dest="${buildDirectory}/${buildLabel}/compilelogs"
272 overwrite="true">
273 <fileset dir="${buildDirectory}/features/org.eclipse.jst">
274 <include name="*.log.zip" />
275 </fileset>
276 </unzip>
277 </target>
278
279 <target name="clean" unless="noclean">
280 <antcall target="allElements">
281 <param name="target" value="cleanElement" />
282 </antcall>
283 </target>
284
285 <!-- ===================================================================== -->
286 <!-- Default target -->
287 <!-- ===================================================================== -->
288 <target name="noDefault">
289 <echo message="You must specify a target when invoking this file" />
290 </target>
ndaib8cedc82005-09-13 18:00:32 +0000291
292</project>