blob: 948abf2f022b2a3ff083c5987f9af03e3df1674c [file] [log] [blame]
david_williams3696f6f2005-12-30 07:59:43 +00001<project name="Build specific targets and properties"
2 default="noDefault">
david_williamsa0aec8e2006-05-23 00:29:00 +00003 <property name="postingDirectory"
david_williams3696f6f2005-12-30 07:59:43 +00004 value="${buildDirectory}" />
ndaib8cedc82005-09-13 18:00:32 +00005
david_williams072c6f72006-05-19 10:50:58 +00006 <!-- ===================================================================== -->
david_williamsa0aec8e2006-05-23 00:29:00 +00007 <!-- 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>
22
23 <!-- ===================================================================== -->
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 <!-- ===================================================================== -->
29
30 <target name="assemble.org.eclipse.wst.sdk">
31 <property name="archiveName"
32 value="wtp-wst-sdk-${buildLabel}.zip" />
33 <ant antfile="${assembleScriptName}"
34 dir="${buildDirectory}" />
35 </target>
36
37 <target name="prePackage" />
38
39 <target name="postPackage">
40
41 <property name="archiveName"
42 value="wtp-wst-sdk-${buildLabel}.zip" />
43
44 <ant antfile="${wtp.builder.home}/scripts/build/buildutilities.xml" target="unpackUpdateJarsAndCreateZippedPackages">
45 <property name="postingDirectory" value="${postingDirectory}"/>
46 <property name="buildDirectory" value="${buildDirectory}"/>
47 <property name="buildLabel" value="${buildLabel}"/>
48 <property name="archiveName" value="${archiveName}"/>
49 </ant>
50
51
52
53 <!-- not sure this merge should be necessary here ... it is current partially because currently
54 third party plugins do not have "src" build properties.
55 but, eventually, we also want to make sdk features "require" (not include)
56 runtime features, so then we'll always have to "manually" merge when creating the
57 zips.
58 -->
59 <zip destfile="${postingDirectory}/${buildLabel}/${archiveName}" update="true">
60 <zipfileset src="${postingDirectory}/${buildLabel}/wtp-wst-${buildLabel}.zip"/>
61 </zip>
62
63
64
65 <ant antfile="${wtp.builder.home}/scripts/build/buildutilities.xml" target="createChecksums">
66 <property name="postingDirectory" value="${postingDirectory}"/>
67 <property name="buildLabel" value="${buildLabel}"/>
68 <property name="archiveName" value="${archiveName}"/>
69 </ant>
70
71
72 </target>
73
74
75
76 <!-- ===================================================================== -->
77 <!-- Check out map files from correct repository -->
78 <!-- Replace values for cvsRoot, package and mapVersionTag as desired. -->
79 <!-- ===================================================================== -->
80 <target name="checkLocal">
81 <available property="mapsLocal"
david_williams3696f6f2005-12-30 07:59:43 +000082 file="${buildDirectory}/maps/releng" />
david_williamsa0aec8e2006-05-23 00:29:00 +000083 </target>
84 <target name="getMapFiles"
david_williams3696f6f2005-12-30 07:59:43 +000085 depends="checkLocal"
86 unless="mapsLocal">
ndaib8cedc82005-09-13 18:00:32 +000087
david_williamsa0aec8e2006-05-23 00:29:00 +000088 <!-- *** change the repo info -->
89 <property name="mapCvsRoot"
david_williams3696f6f2005-12-30 07:59:43 +000090 value=":${cvsProtocol}:${cvsUser}@${cvsServer}:${cvsRoot}" />
david_williamsa0aec8e2006-05-23 00:29:00 +000091 <property name="mapVersionTag" value="HEAD" />
92 <echo message="${mapCvsRoot} ${mapVersionTag} ">
93 </echo>
94 <cvs cvsRoot="${mapCvsRoot}"
david_williams3696f6f2005-12-30 07:59:43 +000095 package="releng"
96 dest="${buildDirectory}/maps"
97 tag="${mapVersionTag}" />
david_williamsa0aec8e2006-05-23 00:29:00 +000098 <!--tag the map files project-->
99 <antcall target="tagMapFiles">
100 <param name="mapCvsRoot"
david_williams3696f6f2005-12-30 07:59:43 +0000101 value="${mapCvsRoot}" />
david_williamsa0aec8e2006-05-23 00:29:00 +0000102 </antcall>
103 </target>
ndaib8cedc82005-09-13 18:00:32 +0000104
david_williamsa0aec8e2006-05-23 00:29:00 +0000105 <target name="tagMapFiles" if="tagMaps">
106 <cvs cvsRoot="${mapCvsRoot}"
david_williams3696f6f2005-12-30 07:59:43 +0000107 dest="${buildDirectory}/maps"
108 command="tag v${buildType}${timestamp}" />
david_williamsa0aec8e2006-05-23 00:29:00 +0000109 </target>
ndaib8cedc82005-09-13 18:00:32 +0000110
david_williamsa0aec8e2006-05-23 00:29:00 +0000111 <!-- ===================================================================== -->
112 <!-- Steps to do before setup -->
113 <!-- ===================================================================== -->
114 <target name="preSetup">
115 </target>
ndaib8cedc82005-09-13 18:00:32 +0000116
david_williamsa0aec8e2006-05-23 00:29:00 +0000117 <!-- ===================================================================== -->
118 <!-- Steps to do after setup but before starting the build proper -->
119 <!-- ===================================================================== -->
120 <target name="postSetup">
121 <dirname file="${ant.file}"
david_williams3696f6f2005-12-30 07:59:43 +0000122 property="component.dir" />
david_williamsa0aec8e2006-05-23 00:29:00 +0000123 <echo message="${buildDirectory}/maps/releng/maps/dependencies.properties" />
124 <ant antfile="${component.dir}/dependency.xml"
david_williams3696f6f2005-12-30 07:59:43 +0000125 target="get">
david_williamsa0aec8e2006-05-23 00:29:00 +0000126 <property name="dependency.properties"
david_williams3696f6f2005-12-30 07:59:43 +0000127 value="${buildDirectory}/maps/releng/maps/dependencies.properties" />
david_williamsa0aec8e2006-05-23 00:29:00 +0000128 <property name="base.install.dir"
david_williams3696f6f2005-12-30 07:59:43 +0000129 value="${buildRoot}" />
david_williamsa0aec8e2006-05-23 00:29:00 +0000130 </ant>
131 </target>
ndaib8cedc82005-09-13 18:00:32 +0000132
david_williamsa0aec8e2006-05-23 00:29:00 +0000133 <!-- ===================================================================== -->
134 <!-- Steps to do before fetching the build elements -->
135 <!-- ===================================================================== -->
136 <target name="preFetch">
137 </target>
ndaib8cedc82005-09-13 18:00:32 +0000138
david_williamsa0aec8e2006-05-23 00:29:00 +0000139 <!-- ===================================================================== -->
140 <!-- Steps to do after fetching the build elements -->
141 <!-- ===================================================================== -->
142 <target name="postFetch">
143 </target>
ndaib8cedc82005-09-13 18:00:32 +0000144
david_williamsa0aec8e2006-05-23 00:29:00 +0000145 <!-- ===================================================================== -->
146 <!-- Steps to do before generating the build scripts. -->
147 <!-- ===================================================================== -->
148 <target name="preGenerate">
149 </target>
ndaib8cedc82005-09-13 18:00:32 +0000150
david_williamsa0aec8e2006-05-23 00:29:00 +0000151 <!-- ===================================================================== -->
152 <!-- Steps to do after generating the build scripts. -->
153 <!-- ===================================================================== -->
154 <target name="postGenerate">
155 </target>
ndaib8cedc82005-09-13 18:00:32 +0000156
157
david_williamsa0aec8e2006-05-23 00:29:00 +0000158 <!-- ===================================================================== -->
159 <!-- Steps to do before running the build.xmls for the elements being built. -->
160 <!-- ===================================================================== -->
161 <target name="preProcess">
162 <replace dir="${buildDirectory}/plugins"
david_williams3696f6f2005-12-30 07:59:43 +0000163 value="${timestamp}"
164 token="@build@">
david_williamsa0aec8e2006-05-23 00:29:00 +0000165 <include name="**/about.mappings" />
166 </replace>
167 </target>
ndaib8cedc82005-09-13 18:00:32 +0000168
david_williamsa0aec8e2006-05-23 00:29:00 +0000169 <!-- ===================================================================== -->
170 <!-- Steps to do after running the build.xmls for the elements being built. -->
171 <!-- ===================================================================== -->
172 <target name="postProcess">
173 <condition property="logsAvailable">
174 <istrue value="${javacVerbose}" />
175 </condition>
176 <antcall target="gatherLogs" />
177 </target>
ndaib8cedc82005-09-13 18:00:32 +0000178
179
david_williamsa0aec8e2006-05-23 00:29:00 +0000180 <!-- ===================================================================== -->
181 <!-- Steps to do before running assemble. -->
182 <!-- ===================================================================== -->
183 <target name="preAssemble">
184 <ant antfile="${buildDirectory}/plugins/org.eclipse.wst.ws.explorer/build-war.xml">
185 <property name="baseLocation"
david_williams3696f6f2005-12-30 07:59:43 +0000186 value="${baseLocation}" />
david_williamsa0aec8e2006-05-23 00:29:00 +0000187 <property name="basedir"
david_williams3696f6f2005-12-30 07:59:43 +0000188 value="${buildDirectory}/plugins/org.eclipse.wst.ws.explorer" />
david_williamsa0aec8e2006-05-23 00:29:00 +0000189 <property name="buildDirectory"
david_williams3696f6f2005-12-30 07:59:43 +0000190 value="${buildDirectory}" />
david_williamsa0aec8e2006-05-23 00:29:00 +0000191 </ant>
ndaib8cedc82005-09-13 18:00:32 +0000192
david_williamsa0aec8e2006-05-23 00:29:00 +0000193 </target>
ndaib8cedc82005-09-13 18:00:32 +0000194
david_williamsa0aec8e2006-05-23 00:29:00 +0000195 <!-- ===================================================================== -->
196 <!-- Steps to do after running assemble. -->
197 <!-- ===================================================================== -->
198 <target name="postAssemble">
ndaib8cedc82005-09-13 18:00:32 +0000199
david_williamsa0aec8e2006-05-23 00:29:00 +0000200 </target>
ndaib8cedc82005-09-13 18:00:32 +0000201
david_williamsa0aec8e2006-05-23 00:29:00 +0000202 <!-- ===================================================================== -->
203 <!-- Steps to do after the build is done. -->
204 <!-- ===================================================================== -->
205 <target name="postBuild">
206 </target>
ndaib8cedc82005-09-13 18:00:32 +0000207
ndaib8cedc82005-09-13 18:00:32 +0000208
david_williamsa0aec8e2006-05-23 00:29:00 +0000209 <!-- ===================================================================== -->
210 <!-- Steps to do to test the build results -->
211 <!-- ===================================================================== -->
212 <target name="test">
213 </target>
ndaib8cedc82005-09-13 18:00:32 +0000214
david_williamsa0aec8e2006-05-23 00:29:00 +0000215 <!-- ===================================================================== -->
216 <!-- Steps to do to publish the build results -->
217 <!-- ===================================================================== -->
218 <target name="publish">
219 </target>
ndaib8cedc82005-09-13 18:00:32 +0000220
ndaib8cedc82005-09-13 18:00:32 +0000221
david_williamsa0aec8e2006-05-23 00:29:00 +0000222 <!-- ===================================================================== -->
223 <!-- Helper targets -->
224 <!-- ===================================================================== -->
225 <target name="gatherLogs" if="logsAvailable">
226 <mkdir dir="${buildDirectory}/${buildLabel}/compilelogs" />
227 <antcall target="allElements">
228 <param name="target" value="gatherLogs" />
229 </antcall>
david_williams3696f6f2005-12-30 07:59:43 +0000230
david_williamsa0aec8e2006-05-23 00:29:00 +0000231 <unzip dest="${buildDirectory}/${buildLabel}/compilelogs"
david_williams3696f6f2005-12-30 07:59:43 +0000232 overwrite="true">
david_williamsa0aec8e2006-05-23 00:29:00 +0000233 <fileset dir="${buildDirectory}/features/org.eclipse.wst.sdk">
234 <include name="*.log.zip" />
235 </fileset>
236 </unzip>
237 </target>
david_williams3696f6f2005-12-30 07:59:43 +0000238
david_williamsa0aec8e2006-05-23 00:29:00 +0000239 <target name="clean" unless="noclean">
240 <antcall target="allElements">
241 <param name="target" value="cleanElement" />
242 </antcall>
243 </target>
david_williams3696f6f2005-12-30 07:59:43 +0000244
david_williamsa0aec8e2006-05-23 00:29:00 +0000245 <!-- ===================================================================== -->
246 <!-- Default target -->
247 <!-- ===================================================================== -->
248 <target name="noDefault">
249 <echo message="You must specify a target when invoking this file" />
250 </target>
ndaib8cedc82005-09-13 18:00:32 +0000251
252</project>