blob: 9dca1d729129ea4c5300ed3abe5e7621c8dedd35 [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.jst.tests" />
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.tests">
31 <property name="archiveName"
david_williamsd30a8542006-02-16 07:20:44 +000032 value="wtp-jst-Automated-Tests-${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-jst-Automated-Tests-${buildLabel}.zip"
david_williams3696f6f2005-12-30 07:59:43 +000038 property="md5" />
david_williamsd30a8542006-02-16 07:20:44 +000039 <echo message="${md5} *wtp-jst-Automated-Tests-${buildLabel}.zip"
40 file="${postingDirectory}/${buildLabel}/checksum/wtp-jst-Automated-Tests-${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-jst-Automated-Tests-${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 <!--fetch the additional pieces to build wst tests -->
101 <property name="featureOnly" value="false" />
102 <property name="featureAndPlugins" value="true" />
103 <property name="featuresRecursively" value="true" />
104 <ant antfile="genericTargets.xml"
105 dir="${pde.build.scripts}"
106 target="fetchElement">
107 <property name="type" value="feature" />
108 <property name="id" value="org.eclipse.wst" />
109 </ant>
110 <ant antfile="genericTargets.xml"
111 dir="${pde.build.scripts}"
112 target="fetchElement">
113 <property name="type" value="feature" />
114 <property name="id" value="org.eclipse.jst" />
115 </ant>
116 <ant antfile="genericTargets.xml"
117 dir="${pde.build.scripts}"
118 target="fetchElement">
119 <property name="type" value="feature" />
120 <property name="id"
121 value="org.eclipse.wst.tests.feature" />
122 </ant>
123 </target>
ndaib8cedc82005-09-13 18:00:32 +0000124
david_williams3696f6f2005-12-30 07:59:43 +0000125 <!-- ===================================================================== -->
126 <!-- Steps to do before fetching the build elements -->
127 <!-- ===================================================================== -->
128 <target name="preFetch">
129 </target>
ndaib8cedc82005-09-13 18:00:32 +0000130
david_williams3696f6f2005-12-30 07:59:43 +0000131 <!-- ===================================================================== -->
132 <!-- Steps to do after fetching the build elements -->
133 <!-- ===================================================================== -->
134 <target name="postFetch">
135 </target>
ndaib8cedc82005-09-13 18:00:32 +0000136
david_williams3696f6f2005-12-30 07:59:43 +0000137 <!-- ===================================================================== -->
138 <!-- Steps to do before generating the build scripts. -->
139 <!-- ===================================================================== -->
140 <target name="preGenerate">
141 </target>
ndaib8cedc82005-09-13 18:00:32 +0000142
david_williams3696f6f2005-12-30 07:59:43 +0000143 <!-- ===================================================================== -->
144 <!-- Steps to do after generating the build scripts. -->
145 <!-- ===================================================================== -->
146 <target name="postGenerate">
147 </target>
ndaib8cedc82005-09-13 18:00:32 +0000148
149
david_williams3696f6f2005-12-30 07:59:43 +0000150 <!-- ===================================================================== -->
151 <!-- Steps to do before running the build.xmls for the elements being built. -->
152 <!-- ===================================================================== -->
153 <target name="preProcess">
154 </target>
ndaib8cedc82005-09-13 18:00:32 +0000155
david_williams3696f6f2005-12-30 07:59:43 +0000156 <!-- ===================================================================== -->
157 <!-- Steps to do after running the build.xmls for the elements being built. -->
158 <!-- ===================================================================== -->
159 <target name="postProcess">
160 </target>
ndaib8cedc82005-09-13 18:00:32 +0000161
162
david_williams3696f6f2005-12-30 07:59:43 +0000163 <!-- ===================================================================== -->
164 <!-- Steps to do before running assemble. -->
165 <!-- ===================================================================== -->
166 <target name="preAssemble">
167 </target>
ndaib8cedc82005-09-13 18:00:32 +0000168
david_williams3696f6f2005-12-30 07:59:43 +0000169 <!-- ===================================================================== -->
170 <!-- Steps to do after running assemble. -->
171 <!-- ===================================================================== -->
172 <target name="postAssemble">
173 </target>
ndaib8cedc82005-09-13 18:00:32 +0000174
david_williams3696f6f2005-12-30 07:59:43 +0000175 <!-- ===================================================================== -->
176 <!-- Steps to do after the build is done. -->
177 <!-- ===================================================================== -->
178 <target name="postBuild">
ndaib8cedc82005-09-13 18:00:32 +0000179
david_williams3696f6f2005-12-30 07:59:43 +0000180 <!-- create zipped up versions for update site -->
181 <property name="UpdateSiteStagingLocation"
david_williams5730aa42006-04-16 02:56:37 +0000182 value="${buildDirectory}/${buildLabel}/updateSite" />
david_williams3696f6f2005-12-30 07:59:43 +0000183 <antcall target="generateUpdateSite" />
184 </target>
ndaib8cedc82005-09-13 18:00:32 +0000185
david_williams3696f6f2005-12-30 07:59:43 +0000186 <target name="generateUpdateSite">
187 <!-- Create the directory structure -->
188 <mkdir dir="${UpdateSiteStagingLocation}" />
189 <mkdir dir="${UpdateSiteStagingLocation}/features" />
190 <mkdir dir="${UpdateSiteStagingLocation}/plugins" />
191 <!-- Build the jar files -->
192 <antcall target="allElements">
193 <param name="genericTargets"
194 value="${builder}/customTargets.xml" />
195 <param name="target" value="updateSiteExport" />
196 </antcall>
197 <antcall target="copySiteXmlFromCvs" />
198 <antcall target="createNightlyBuildSiteXml" />
199 </target>
200 <target name="updateSiteExport">
201 <ant antfile="build.xml"
202 dir="${buildDirectory}/features/${id}/"
203 target="build.update.jar">
204 <property name="feature.destination"
205 value="${UpdateSiteStagingLocation}/features" />
206 <property name="plugin.destination"
207 value="${UpdateSiteStagingLocation}/plugins" />
208 </ant>
209 </target>
210 <target name="copySiteXmlFromCvs"
211 unless="isNightlyBuild">
212 <!-- connect to CVS and fetch site.xml, copy to ${UpdateSiteStagingLocation}/site.xml afterwards -->
213 </target>
214 <target name="createNightlyBuildSiteXml"
215 if="isNightlyBuild">
216 <!-- create ${UpdateSiteStagingLocation}/site.xml which contains only the nighlty build version -->
217 </target>
ndaib8cedc82005-09-13 18:00:32 +0000218
david_williams3696f6f2005-12-30 07:59:43 +0000219 <!-- ===================================================================== -->
220 <!-- Steps to do to test the build results -->
221 <!-- ===================================================================== -->
222 <target name="test">
223 </target>
224
225
226 <!-- ===================================================================== -->
227 <!-- Steps to do to publish the build results -->
228 <!-- ===================================================================== -->
229 <target name="publish">
230 </target>
231
232 <!-- ===================================================================== -->
233 <!-- Default target -->
234 <!-- ===================================================================== -->
235 <target name="noDefault">
236 <echo message="You must specify a target when invoking this file" />
237 </target>
ndaib8cedc82005-09-13 18:00:32 +0000238
239</project>