blob: 20c75057d14d75938628ac1ab2d1423d3eb8b5d1 [file] [log] [blame]
david_williams3696f6f2005-12-30 07:59:43 +00001<project name="Build specific targets and properties"
2 default="noDefault">
3 <property name="postingDirectory"
4 value="${buildDirectory}" />
ndaib8cedc82005-09-13 18:00:32 +00005
david_williams3696f6f2005-12-30 07:59:43 +00006 <!-- ===================================================================== -->
7 <!-- Run a given ${target} on all elements being built -->
8 <!-- Add on <ant> task for each top level element being built. -->
9 <!-- ===================================================================== -->
10 <target name="allElements">
11 <echo message="Target:${target} " />
12 <echo message="basedir: ${basedir}" />
13 <echo message="component: ${component}" />
14 <echo message="buildDirectory: ${buildDirectory}" />
15 <echo message="baseLocation: ${baseLocation}" />
16 <ant antfile="${genericTargets}" target="${target}">
17 <property name="type" value="feature" />
18 <property name="id"
19 value="org.eclipse.wst.sdk" />
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.wst.sdk">
31 <property name="archiveName"
david_williamsd30a8542006-02-16 07:20:44 +000032 value="wtp-wst-sdk-${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-wst-sdk-${buildLabel}.zip"
david_williams3696f6f2005-12-30 07:59:43 +000038 property="md5" />
david_williamsd30a8542006-02-16 07:20:44 +000039 <echo message="${md5} *wtp-wst-sdk-${buildLabel}.zip"
40 file="${postingDirectory}/${buildLabel}/checksum/wtp-wst-sdk-${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-wst-sdk-${buildLabel}.zip.md5antformat" />
ndaib8cedc82005-09-13 18:00:32 +000043
david_williams3696f6f2005-12-30 07:59:43 +000044 </target>
ndaib8cedc82005-09-13 18:00:32 +000045
david_williams3696f6f2005-12-30 07:59:43 +000046 <!-- ===================================================================== -->
47 <!-- Check out map files from correct repository -->
48 <!-- Replace values for cvsRoot, package and mapVersionTag as desired. -->
49 <!-- ===================================================================== -->
50 <target name="checkLocal">
51 <available property="mapsLocal"
52 file="${buildDirectory}/maps/releng" />
53 </target>
54 <target name="getMapFiles"
55 depends="checkLocal"
56 unless="mapsLocal">
ndaib8cedc82005-09-13 18:00:32 +000057
david_williams3696f6f2005-12-30 07:59:43 +000058 <!-- *** change the repo info -->
59 <property name="mapCvsRoot"
60 value=":${cvsProtocol}:${cvsUser}@${cvsServer}:${cvsRoot}" />
61 <property name="mapVersionTag" value="HEAD" />
62 <echo message="${mapCvsRoot} ${mapVersionTag} ">
63 </echo>
64 <cvs cvsRoot="${mapCvsRoot}"
65 package="releng"
66 dest="${buildDirectory}/maps"
67 tag="${mapVersionTag}" />
68 <!--tag the map files project-->
69 <antcall target="tagMapFiles">
70 <param name="mapCvsRoot"
71 value="${mapCvsRoot}" />
72 </antcall>
73 </target>
ndaib8cedc82005-09-13 18:00:32 +000074
david_williams3696f6f2005-12-30 07:59:43 +000075 <target name="tagMapFiles" if="tagMaps">
76 <cvs cvsRoot="${mapCvsRoot}"
77 dest="${buildDirectory}/maps"
78 command="tag v${buildType}${timestamp}" />
79 </target>
ndaib8cedc82005-09-13 18:00:32 +000080
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 <echo message="${buildDirectory}/maps/releng/maps/dependencies.properties" />
94 <ant antfile="${component.dir}/dependency.xml"
95 target="get">
96 <property name="dependency.properties"
97 value="${buildDirectory}/maps/releng/maps/dependencies.properties" />
98 <property name="base.install.dir"
99 value="${buildRoot}" />
100 </ant>
101 </target>
ndaib8cedc82005-09-13 18:00:32 +0000102
david_williams3696f6f2005-12-30 07:59:43 +0000103 <!-- ===================================================================== -->
104 <!-- Steps to do before fetching the build elements -->
105 <!-- ===================================================================== -->
106 <target name="preFetch">
107 </target>
ndaib8cedc82005-09-13 18:00:32 +0000108
david_williams3696f6f2005-12-30 07:59:43 +0000109 <!-- ===================================================================== -->
110 <!-- Steps to do after fetching the build elements -->
111 <!-- ===================================================================== -->
112 <target name="postFetch">
113 </target>
ndaib8cedc82005-09-13 18:00:32 +0000114
david_williams3696f6f2005-12-30 07:59:43 +0000115 <!-- ===================================================================== -->
116 <!-- Steps to do before generating the build scripts. -->
117 <!-- ===================================================================== -->
118 <target name="preGenerate">
119 </target>
ndaib8cedc82005-09-13 18:00:32 +0000120
david_williams3696f6f2005-12-30 07:59:43 +0000121 <!-- ===================================================================== -->
122 <!-- Steps to do after generating the build scripts. -->
123 <!-- ===================================================================== -->
124 <target name="postGenerate">
125 </target>
ndaib8cedc82005-09-13 18:00:32 +0000126
127
david_williams3696f6f2005-12-30 07:59:43 +0000128 <!-- ===================================================================== -->
129 <!-- Steps to do before running the build.xmls for the elements being built. -->
130 <!-- ===================================================================== -->
131 <target name="preProcess">
132 <replace dir="${buildDirectory}/plugins"
133 value="${timestamp}"
134 token="@build@">
135 <include name="**/about.mappings" />
136 </replace>
137 </target>
ndaib8cedc82005-09-13 18:00:32 +0000138
david_williams3696f6f2005-12-30 07:59:43 +0000139 <!-- ===================================================================== -->
140 <!-- Steps to do after running the build.xmls for the elements being built. -->
141 <!-- ===================================================================== -->
142 <target name="postProcess">
143 <condition property="logsAvailable">
144 <istrue value="${javacVerbose}" />
145 </condition>
146 <antcall target="gatherLogs" />
147 </target>
ndaib8cedc82005-09-13 18:00:32 +0000148
149
david_williams3696f6f2005-12-30 07:59:43 +0000150 <!-- ===================================================================== -->
151 <!-- Steps to do before running assemble. -->
152 <!-- ===================================================================== -->
153 <target name="preAssemble">
154 <ant antfile="${buildDirectory}/plugins/org.eclipse.wst.ws.explorer/build-war.xml">
155 <property name="baseLocation"
156 value="${baseLocation}" />
157 <property name="basedir"
158 value="${buildDirectory}/plugins/org.eclipse.wst.ws.explorer" />
159 <property name="buildDirectory"
160 value="${buildDirectory}" />
161 </ant>
ndaib8cedc82005-09-13 18:00:32 +0000162
david_williams3696f6f2005-12-30 07:59:43 +0000163 </target>
ndaib8cedc82005-09-13 18:00:32 +0000164
david_williams3696f6f2005-12-30 07:59:43 +0000165 <!-- ===================================================================== -->
166 <!-- Steps to do after running assemble. -->
167 <!-- ===================================================================== -->
168 <target name="postAssemble">
ndaib8cedc82005-09-13 18:00:32 +0000169
david_williams3696f6f2005-12-30 07:59:43 +0000170 </target>
ndaib8cedc82005-09-13 18:00:32 +0000171
david_williams3696f6f2005-12-30 07:59:43 +0000172 <!-- ===================================================================== -->
173 <!-- Steps to do after the build is done. -->
174 <!-- ===================================================================== -->
175 <target name="postBuild">
176 <!-- create zipped up versions for update site -->
177 <property name="UpdateSiteStagingLocation"
david_williams5730aa42006-04-16 02:56:37 +0000178 value="${buildDirectory}/${buildLabel}/updateSite" />
david_williams3696f6f2005-12-30 07:59:43 +0000179 <antcall target="generateUpdateSite" />
180 </target>
ndaib8cedc82005-09-13 18:00:32 +0000181
david_williams3696f6f2005-12-30 07:59:43 +0000182 <target name="generateUpdateSite">
183 <!-- Create the directory structure -->
184 <mkdir dir="${UpdateSiteStagingLocation}" />
185 <mkdir dir="${UpdateSiteStagingLocation}/features" />
186 <mkdir dir="${UpdateSiteStagingLocation}/plugins" />
187 <!-- Build the jar files -->
188 <antcall target="allElements">
189 <param name="genericTargets"
190 value="${builder}/customTargets.xml" />
191 <param name="target" value="updateSiteExport" />
192 </antcall>
193 <antcall target="copySiteXmlFromCvs" />
194 <antcall target="createNightlyBuildSiteXml" />
195 </target>
196 <target name="updateSiteExport">
197 <ant antfile="build.xml"
198 dir="${buildDirectory}/features/${id}/"
199 target="build.update.jar">
200 <property name="feature.destination"
201 value="${UpdateSiteStagingLocation}/features" />
202 <property name="plugin.destination"
203 value="${UpdateSiteStagingLocation}/plugins" />
204 </ant>
205 </target>
206 <target name="copySiteXmlFromCvs"
207 unless="isNightlyBuild">
208 <!-- connect to CVS and fetch site.xml, copy to ${UpdateSiteStagingLocation}/site.xml afterwards -->
209 </target>
210 <target name="createNightlyBuildSiteXml"
211 if="isNightlyBuild">
212 <!-- create ${UpdateSiteStagingLocation}/site.xml which contains only the nighlty build version -->
213 </target>
ndaib8cedc82005-09-13 18:00:32 +0000214
215
david_williams3696f6f2005-12-30 07:59:43 +0000216 <!-- ===================================================================== -->
217 <!-- Steps to do to test the build results -->
218 <!-- ===================================================================== -->
219 <target name="test">
220 </target>
ndaib8cedc82005-09-13 18:00:32 +0000221
david_williams3696f6f2005-12-30 07:59:43 +0000222 <!-- ===================================================================== -->
223 <!-- Steps to do to publish the build results -->
224 <!-- ===================================================================== -->
225 <target name="publish">
226 </target>
ndaib8cedc82005-09-13 18:00:32 +0000227
ndaib8cedc82005-09-13 18:00:32 +0000228
david_williams3696f6f2005-12-30 07:59:43 +0000229 <!-- ===================================================================== -->
230 <!-- Helper targets -->
231 <!-- ===================================================================== -->
232 <target name="gatherLogs" if="logsAvailable">
233 <mkdir dir="${buildDirectory}/${buildLabel}/compilelogs" />
234 <antcall target="allElements">
235 <param name="target" value="gatherLogs" />
236 </antcall>
237
238 <unzip dest="${buildDirectory}/${buildLabel}/compilelogs"
239 overwrite="true">
240 <fileset dir="${buildDirectory}/features/org.eclipse.wst.sdk">
241 <include name="*.log.zip" />
242 </fileset>
243 </unzip>
244 </target>
245
246 <target name="clean" unless="noclean">
247 <antcall target="allElements">
248 <param name="target" value="cleanElement" />
249 </antcall>
250 </target>
251
252 <!-- ===================================================================== -->
253 <!-- Default target -->
254 <!-- ===================================================================== -->
255 <target name="noDefault">
256 <echo message="You must specify a target when invoking this file" />
257 </target>
ndaib8cedc82005-09-13 18:00:32 +0000258
259</project>