blob: 83c7814973a550a67e63d08d3bee3f8623d61540 [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.wst" />
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">
31 <property name="archiveName"
david_williamsd30a8542006-02-16 07:20:44 +000032 value="wtp-wst-${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-${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-${buildLabel}.zip"
40 file="${postingDirectory}/${buildLabel}/checksum/wtp-wst-${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-${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
81
david_williams3696f6f2005-12-30 07:59:43 +000082 <!-- ===================================================================== -->
83 <!-- Steps to do before setup -->
84 <!-- ===================================================================== -->
85 <target name="preSetup">
86 </target>
ndaib8cedc82005-09-13 18:00:32 +000087
david_williams3696f6f2005-12-30 07:59:43 +000088 <!-- ===================================================================== -->
89 <!-- Steps to do after setup but before starting the build proper -->
90 <!-- ===================================================================== -->
91 <target name="postSetup">
92 <dirname file="${ant.file}"
93 property="component.dir" />
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>
ndaib8cedc82005-09-13 18:00:32 +0000101
david_williams3696f6f2005-12-30 07:59:43 +0000102 </target>
ndaib8cedc82005-09-13 18:00:32 +0000103
david_williams3696f6f2005-12-30 07:59:43 +0000104 <!-- ===================================================================== -->
105 <!-- Steps to do before fetching the build elements -->
106 <!-- ===================================================================== -->
107 <target name="preFetch">
108 </target>
ndaib8cedc82005-09-13 18:00:32 +0000109
david_williams3696f6f2005-12-30 07:59:43 +0000110 <!-- ===================================================================== -->
111 <!-- Steps to do after fetching the build elements -->
112 <!-- ===================================================================== -->
113 <target name="postFetch">
114 </target>
ndaib8cedc82005-09-13 18:00:32 +0000115
david_williams3696f6f2005-12-30 07:59:43 +0000116 <!-- ===================================================================== -->
117 <!-- Steps to do before generating the build scripts. -->
118 <!-- ===================================================================== -->
119 <target name="preGenerate">
120 </target>
ndaib8cedc82005-09-13 18:00:32 +0000121
david_williams3696f6f2005-12-30 07:59:43 +0000122 <!-- ===================================================================== -->
123 <!-- Steps to do after generating the build scripts. -->
124 <!-- ===================================================================== -->
125 <target name="postGenerate">
126 </target>
ndaib8cedc82005-09-13 18:00:32 +0000127
128
david_williams3696f6f2005-12-30 07:59:43 +0000129 <!-- ===================================================================== -->
130 <!-- Steps to do before running the build.xmls for the elements being built. -->
131 <!-- ===================================================================== -->
132 <target name="preProcess">
133 <replace dir="${buildDirectory}/plugins"
134 value="${timestamp}"
135 token="@build@">
136 <include name="**/about.mappings" />
137 </replace>
138 </target>
ndaib8cedc82005-09-13 18:00:32 +0000139
david_williams3696f6f2005-12-30 07:59:43 +0000140 <!-- ===================================================================== -->
141 <!-- Steps to do after running the build.xmls for the elements being built. -->
142 <!-- ===================================================================== -->
143 <target name="postProcess">
144 <condition property="logsAvailable">
145 <istrue value="${javacVerbose}" />
146 </condition>
147 <antcall target="gatherLogs" />
148 </target>
ndaib8cedc82005-09-13 18:00:32 +0000149
150
david_williams3696f6f2005-12-30 07:59:43 +0000151 <!-- ===================================================================== -->
152 <!-- Steps to do before running assemble. -->
153 <!-- ===================================================================== -->
154 <target name="preAssemble">
155 <ant antfile="${buildDirectory}/plugins/org.eclipse.wst.ws.explorer/build-war.xml">
156 <property name="baseLocation"
157 value="${baseLocation}" />
158 <property name="basedir"
159 value="${buildDirectory}/plugins/org.eclipse.wst.ws.explorer" />
160 <property name="buildDirectory"
161 value="${buildDirectory}" />
162 </ant>
163 </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">
169 </target>
ndaib8cedc82005-09-13 18:00:32 +0000170
david_williams3696f6f2005-12-30 07:59:43 +0000171 <!-- ===================================================================== -->
172 <!-- Steps to do after the build is done. -->
173 <!-- ===================================================================== -->
174 <target name="postBuild">
175 <!-- create zipped up versions for update site -->
david_williamsa2cff962006-04-30 19:25:31 +0000176 <!-- removing for now, see https://bugs.eclipse.org/bugs/show_bug.cgi?id=139268
david_williams3696f6f2005-12-30 07:59:43 +0000177 <property name="UpdateSiteStagingLocation"
david_williamsa2cff962006-04-30 19:25:31 +0000178 value="${buildDirectory}/${buildLabel}/updateSite" />
david_williams3696f6f2005-12-30 07:59:43 +0000179 <antcall target="generateUpdateSite" />
david_williamsa2cff962006-04-30 19:25:31 +0000180 -->
david_williams3696f6f2005-12-30 07:59:43 +0000181 </target>
ndaib8cedc82005-09-13 18:00:32 +0000182
david_williams3696f6f2005-12-30 07:59:43 +0000183 <target name="generateUpdateSite">
184 <!-- Create the directory structure -->
185 <mkdir dir="${UpdateSiteStagingLocation}" />
186 <mkdir dir="${UpdateSiteStagingLocation}/features" />
187 <mkdir dir="${UpdateSiteStagingLocation}/plugins" />
188 <!-- Build the jar files -->
189 <antcall target="allElements">
190 <param name="genericTargets"
191 value="${builder}/customTargets.xml" />
192 <param name="target" value="updateSiteExport" />
193 </antcall>
194 <antcall target="copySiteXmlFromCvs" />
195 <antcall target="createNightlyBuildSiteXml" />
196 </target>
197 <target name="updateSiteExport">
198 <ant antfile="build.xml"
199 dir="${buildDirectory}/features/${id}/"
200 target="build.update.jar">
201 <property name="feature.destination"
202 value="${UpdateSiteStagingLocation}/features" />
203 <property name="plugin.destination"
204 value="${UpdateSiteStagingLocation}/plugins" />
205 </ant>
206 </target>
207 <target name="copySiteXmlFromCvs"
208 unless="isNightlyBuild">
209 <!-- connect to CVS and fetch site.xml, copy to ${UpdateSiteStagingLocation}/site.xml afterwards -->
210 </target>
211 <target name="createNightlyBuildSiteXml"
212 if="isNightlyBuild">
213 <!-- create ${UpdateSiteStagingLocation}/site.xml which contains only the nighlty build version -->
214 </target>
ndaib8cedc82005-09-13 18:00:32 +0000215
216
david_williams3696f6f2005-12-30 07:59:43 +0000217 <!-- ===================================================================== -->
218 <!-- Steps to do to test the build results -->
219 <!-- ===================================================================== -->
220 <target name="test">
221 </target>
ndaib8cedc82005-09-13 18:00:32 +0000222
david_williams3696f6f2005-12-30 07:59:43 +0000223 <!-- ===================================================================== -->
224 <!-- Steps to do to publish the build results -->
225 <!-- ===================================================================== -->
226 <target name="publish">
227 </target>
ndaib8cedc82005-09-13 18:00:32 +0000228
ndaib8cedc82005-09-13 18:00:32 +0000229
david_williams3696f6f2005-12-30 07:59:43 +0000230 <!-- ===================================================================== -->
231 <!-- Helper targets -->
232 <!-- ===================================================================== -->
233 <target name="gatherLogs" if="logsAvailable">
234 <mkdir dir="${buildDirectory}/${buildLabel}/compilelogs" />
235 <antcall target="allElements">
236 <param name="target" value="gatherLogs" />
237 </antcall>
238
239 <unzip dest="${buildDirectory}/${buildLabel}/compilelogs"
240 overwrite="true">
241 <fileset dir="${buildDirectory}/features/org.eclipse.wst">
242 <include name="*.log.zip" />
243 </fileset>
244 </unzip>
245 </target>
246
247 <target name="clean" unless="noclean">
248 <antcall target="allElements">
249 <param name="target" value="cleanElement" />
250 </antcall>
251 </target>
252
253 <!-- ===================================================================== -->
254 <!-- Default target -->
255 <!-- ===================================================================== -->
256 <target name="noDefault">
257 <echo message="You must specify a target when invoking this file" />
258 </target>
ndaib8cedc82005-09-13 18:00:32 +0000259
260</project>