blob: 9c55ca521d70a7df8836ff58146e0f09adc16d61 [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"
20 value="org.eclipse.jst.sdk" />
21 </ant>
22 </target>
ndaib8cedc82005-09-13 18:00:32 +000023
david_williams3696f6f2005-12-30 07:59:43 +000024 <!-- ===================================================================== -->
25 <!-- Targets to assemble the built elements for particular configurations -->
26 <!-- These generally call the generated assemble scripts (named in -->
27 <!-- ${assembleScriptName}) but may also add pre and post processing -->
28 <!-- Add one target for each root element and each configuration -->
29 <!-- ===================================================================== -->
ndaib8cedc82005-09-13 18:00:32 +000030
david_williams3696f6f2005-12-30 07:59:43 +000031 <target name="assemble.org.eclipse.jst.sdk">
32 <property name="archiveName"
david_williamsd30a8542006-02-16 07:20:44 +000033 value="wtp-sdk-${buildLabel}.zip" />
david_williams3696f6f2005-12-30 07:59:43 +000034 <ant antfile="${assembleScriptName}"
35 dir="${buildDirectory}" />
36 </target>
ndaib8cedc82005-09-13 18:00:32 +000037
david_williams3696f6f2005-12-30 07:59:43 +000038 <!-- ===================================================================== -->
39 <!-- Check out map files from correct repository -->
40 <!-- Replace values for cvsRoot, package and mapVersionTag as desired. -->
41 <!-- ===================================================================== -->
42 <target name="checkLocal">
43 <available property="mapsLocal"
44 file="${buildDirectory}/maps/releng" />
45 </target>
46 <target name="getMapFiles"
47 depends="checkLocal"
48 unless="mapsLocal">
ndaib8cedc82005-09-13 18:00:32 +000049
david_williams3696f6f2005-12-30 07:59:43 +000050 <!-- *** change the repo info -->
51 <property name="mapCvsRoot"
52 value=":${cvsProtocol}:${cvsUser}@${cvsServer}:${cvsRoot}" />
53 <property name="mapVersionTag" value="HEAD" />
54 <echo message="${mapCvsRoot} ${mapVersionTag} ">
55 </echo>
56 <cvs cvsRoot="${mapCvsRoot}"
57 package="releng"
58 dest="${buildDirectory}/maps"
59 tag="${mapVersionTag}" />
60 <!--tag the map files project-->
61 <antcall target="tagMapFiles">
62 <param name="mapCvsRoot"
63 value="${mapCvsRoot}" />
64 </antcall>
65 </target>
ndaib8cedc82005-09-13 18:00:32 +000066
david_williams3696f6f2005-12-30 07:59:43 +000067 <target name="tagMapFiles" if="tagMaps">
68 <cvs cvsRoot="${mapCvsRoot}"
69 dest="${buildDirectory}/maps"
70 command="tag v${buildType}${timestamp}" />
71 </target>
ndaib8cedc82005-09-13 18:00:32 +000072
73
david_williams3696f6f2005-12-30 07:59:43 +000074 <!-- ===================================================================== -->
75 <!-- Steps to do before setup -->
76 <!-- ===================================================================== -->
77 <target name="preSetup">
78 </target>
ndaib8cedc82005-09-13 18:00:32 +000079
david_williams3696f6f2005-12-30 07:59:43 +000080 <!-- ===================================================================== -->
81 <!-- Steps to do after setup but before starting the build proper -->
82 <!-- ===================================================================== -->
83 <target name="postSetup">
84 <dirname file="${ant.file}"
85 property="component.dir" />
86 <ant antfile="${component.dir}/dependency.xml"
87 target="get">
88 <property name="dependency.properties"
89 value="${buildDirectory}/maps/releng/maps/dependencies.properties" />
90 <property name="base.install.dir"
91 value="${buildRoot}" />
92 </ant>
93 </target>
ndaib8cedc82005-09-13 18:00:32 +000094
david_williams3696f6f2005-12-30 07:59:43 +000095 <!-- ===================================================================== -->
96 <!-- Steps to do before fetching the build elements -->
97 <!-- ===================================================================== -->
98 <target name="preFetch">
99 </target>
ndaib8cedc82005-09-13 18:00:32 +0000100
david_williams3696f6f2005-12-30 07:59:43 +0000101 <!-- ===================================================================== -->
102 <!-- Steps to do after fetching the build elements -->
103 <!-- ===================================================================== -->
104 <target name="postFetch">
105 </target>
ndaib8cedc82005-09-13 18:00:32 +0000106
david_williams3696f6f2005-12-30 07:59:43 +0000107 <!-- ===================================================================== -->
108 <!-- Steps to do before generating the build scripts. -->
109 <!-- ===================================================================== -->
110 <target name="preGenerate">
111 </target>
ndaib8cedc82005-09-13 18:00:32 +0000112
david_williams3696f6f2005-12-30 07:59:43 +0000113 <!-- ===================================================================== -->
114 <!-- Steps to do after generating the build scripts. -->
115 <!-- ===================================================================== -->
116 <target name="postGenerate">
117 </target>
ndaib8cedc82005-09-13 18:00:32 +0000118
119
david_williams3696f6f2005-12-30 07:59:43 +0000120 <!-- ===================================================================== -->
121 <!-- Steps to do before running the build.xmls for the elements being built. -->
122 <!-- ===================================================================== -->
123 <target name="preProcess">
124 <replace dir="${buildDirectory}/plugins"
125 value="${timestamp}"
126 token="@build@">
127 <include name="**/about.mappings" />
128 </replace>
129 </target>
ndaib8cedc82005-09-13 18:00:32 +0000130
david_williams3696f6f2005-12-30 07:59:43 +0000131 <!-- ===================================================================== -->
132 <!-- Steps to do after running the build.xmls for the elements being built. -->
133 <!-- ===================================================================== -->
134 <target name="postProcess">
135 <condition property="logsAvailable">
136 <istrue value="${javacVerbose}" />
137 </condition>
138 <antcall target="gatherLogs" />
139 </target>
ndaib8cedc82005-09-13 18:00:32 +0000140
141
david_williams3696f6f2005-12-30 07:59:43 +0000142 <!-- ===================================================================== -->
143 <!-- Steps to do before running assemble. -->
144 <!-- ===================================================================== -->
145 <target name="preAssemble">
146 <!--
ndaib8cedc82005-09-13 18:00:32 +0000147 <ant antfile="${relengDir}/fetchVendorContent.xml" target="cleanup">
148 <property name="basedir" value="${relengDir}"/>
149 <property name="buildDirectory" value="${buildDirectory}/plugins"/>
150 <property name="sdk" value="true"/>
151 </ant>
152 -->
david_williams3696f6f2005-12-30 07:59:43 +0000153 </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 <!--
ndaib8cedc82005-09-13 18:00:32 +0000160 <ant antfile="${relengDir}/fetchVendorContent.xml">
161 <property name="basedir" value="${relengDir}"/>
162 <property name="buildDirectory" value="${buildDirectory}/plugins"/>
163 <property name="sdk" value="true"/>
164 </ant>
165 -->
david_williams3696f6f2005-12-30 07:59:43 +0000166 </target>
ndaib8cedc82005-09-13 18:00:32 +0000167
david_williams3696f6f2005-12-30 07:59:43 +0000168 <!-- ===================================================================== -->
169 <!-- Steps to do after the build is done. -->
170 <!-- ===================================================================== -->
171 <target name="postBuild">
172 <property name="assemble-all"
173 value="${buildDirectory}/assemble-all-sdk" />
174 <unzip dest="${assemble-all}"
david_williamsd30a8542006-02-16 07:20:44 +0000175 src="${postingDirectory}/${buildLabel}/wtp-sdk-${buildLabel}.zip"
david_williams3696f6f2005-12-30 07:59:43 +0000176 overwrite="true" />
177 <unzip dest="${assemble-all}"
david_williamsd30a8542006-02-16 07:20:44 +0000178 src="${postingDirectory}/${buildLabel}/wtp-wst-sdk-${buildLabel}.zip"
david_williams3696f6f2005-12-30 07:59:43 +0000179 overwrite="true" />
david_williamsd30a8542006-02-16 07:20:44 +0000180 <zip destfile="${postingDirectory}/${buildLabel}/wtp-sdk-${buildLabel}.zip"
david_williams3696f6f2005-12-30 07:59:43 +0000181 basedir="${assemble-all}" />
david_williamsf1bbec12005-12-21 01:27:18 +0000182
david_williamsd30a8542006-02-16 07:20:44 +0000183 <delete file="${postingDirectory}/${buildLabel}/checksum/wtp-sdk-${buildLabel}.zip.md5"
david_williams3696f6f2005-12-30 07:59:43 +0000184 failonerror="false" />
185 <mkdir dir="${postingDirectory}/${buildLabel}/checksum" />
david_williamsf1bbec12005-12-21 01:27:18 +0000186
david_williamsd30a8542006-02-16 07:20:44 +0000187 <checksum file="${postingDirectory}/${buildLabel}/wtp-sdk-${buildLabel}.zip"
david_williams3696f6f2005-12-30 07:59:43 +0000188 property="md5" />
david_williamsd30a8542006-02-16 07:20:44 +0000189 <echo message="${md5} *wtp-sdk-${buildLabel}.zip"
190 file="${postingDirectory}/${buildLabel}/checksum/wtp-sdk-${buildLabel}.zip.md5" />
david_williamse23cd862005-12-30 08:08:40 +0000191 <echo message="${md5}"
david_williamsd30a8542006-02-16 07:20:44 +0000192 file="${postingDirectory}/${buildLabel}/checksum/wtp-sdk-${buildLabel}.zip.md5antformat" />
david_williamsf1bbec12005-12-21 01:27:18 +0000193
ndaib8cedc82005-09-13 18:00:32 +0000194
david_williams3696f6f2005-12-30 07:59:43 +0000195 <!-- create zipped up versions for update site -->
david_williamsa2cff962006-04-30 19:25:31 +0000196 <!-- removing for now, see https://bugs.eclipse.org/bugs/show_bug.cgi?id=139268
197
david_williams3696f6f2005-12-30 07:59:43 +0000198 <property name="UpdateSiteStagingLocation"
david_williamsa2cff962006-04-30 19:25:31 +0000199 value="${buildDirectory}/${buildLabel}/updateSite" />
david_williams3696f6f2005-12-30 07:59:43 +0000200 <antcall target="generateUpdateSite" />
david_williamsa2cff962006-04-30 19:25:31 +0000201 -->
david_williams3696f6f2005-12-30 07:59:43 +0000202 </target>
ndaib8cedc82005-09-13 18:00:32 +0000203
david_williams3696f6f2005-12-30 07:59:43 +0000204 <target name="generateUpdateSite">
205 <!-- Create the directory structure -->
206 <mkdir dir="${UpdateSiteStagingLocation}" />
207 <mkdir dir="${UpdateSiteStagingLocation}/features" />
208 <mkdir dir="${UpdateSiteStagingLocation}/plugins" />
209 <!-- Build the jar files -->
210 <antcall target="allElements">
211 <param name="genericTargets"
212 value="${builder}/customTargets.xml" />
213 <param name="target" value="updateSiteExport" />
214 </antcall>
215 <antcall target="copySiteXmlFromCvs" />
216 <antcall target="createNightlyBuildSiteXml" />
217 </target>
218 <target name="updateSiteExport">
219 <ant antfile="build.xml"
220 dir="${buildDirectory}/features/${id}/"
221 target="build.update.jar">
222 <property name="feature.destination"
223 value="${UpdateSiteStagingLocation}/features" />
224 <property name="plugin.destination"
225 value="${UpdateSiteStagingLocation}/plugins" />
226 </ant>
227 </target>
228 <target name="copySiteXmlFromCvs"
229 unless="isNightlyBuild">
230 <!-- connect to CVS and fetch site.xml, copy to ${UpdateSiteStagingLocation}/site.xml afterwards -->
231 </target>
232 <target name="createNightlyBuildSiteXml"
233 if="isNightlyBuild">
234 <!-- create ${UpdateSiteStagingLocation}/site.xml which contains only the nighlty build version -->
235 </target>
ndaib8cedc82005-09-13 18:00:32 +0000236
ndaib8cedc82005-09-13 18:00:32 +0000237
ndaib8cedc82005-09-13 18:00:32 +0000238
ndaib8cedc82005-09-13 18:00:32 +0000239
david_williams3696f6f2005-12-30 07:59:43 +0000240 <!-- ===================================================================== -->
241 <!-- Steps to do to test the build results -->
242 <!-- ===================================================================== -->
243 <target name="test">
244 </target>
245
246 <!-- ===================================================================== -->
247 <!-- Steps to do to publish the build results -->
248 <!-- ===================================================================== -->
249 <target name="publish">
250 </target>
251
252 <!-- ===================================================================== -->
253 <!-- Helper targets -->
254 <!-- ===================================================================== -->
255 <target name="gatherLogs" if="logsAvailable">
256 <mkdir dir="${buildDirectory}/${buildLabel}/compilelogs" />
257 <antcall target="allElements">
258 <param name="target" value="gatherLogs" />
259 </antcall>
260
261 <unzip dest="${buildDirectory}/${buildLabel}/compilelogs"
262 overwrite="true">
263 <fileset dir="${buildDirectory}/features/org.eclipse.jst.sdk">
264 <include name="*.log.zip" />
265 </fileset>
266 </unzip>
267 </target>
268
269 <target name="clean" unless="noclean">
270 <antcall target="allElements">
271 <param name="target" value="cleanElement" />
272 </antcall>
273 </target>
274
275 <!-- ===================================================================== -->
276 <!-- Default target -->
277 <!-- ===================================================================== -->
278 <target name="noDefault">
279 <echo message="You must specify a target when invoking this file" />
280 </target>
ndaib8cedc82005-09-13 18:00:32 +0000281
282</project>