blob: 3019054ddfad986033989bbde801caf398ae258a [file] [log] [blame]
jeffliu20cbe5f2005-10-05 19:06:30 +00001<project default="main" basedir=".">
2
3 <!--
4 Required inputs:
5
6 build.home
7 buildType
8 buildId
9 timestamp
10 baseos
11 basews
12 basearch
jeffliue942a942005-11-29 17:34:57 +000013 build.committers [optional]
jeffliu20cbe5f2005-10-05 19:06:30 +000014 releng.tag [optional]
15 wtp.dir [optional]
jeffliuc4ea6b02006-02-28 00:40:33 +000016 clean [optional]
jeffliu20cbe5f2005-10-05 19:06:30 +000017 -->
18
19 <target name="main">
20 <property file="${build.home}/releng.wtpbuilder/build.properties"/>
21 <property name="wtp.api" value="${build.home}/releng.wtpbuilder/distribution/wtp.api"/>
jeffliu7b325052006-03-16 21:06:55 +000022 <property name="apiRoot" value="${build.home}/apiRoot"/>
jeffliuc4ea6b02006-02-28 00:40:33 +000023 <delete dir="${apiRoot}" failonerror="false"/>
jeffliu20cbe5f2005-10-05 19:06:30 +000024 <mkdir dir="${apiRoot}"/>
25 <antcall target="getReleng"/>
26 <property file="${apiRoot}/releng/maps/dependencies.properties"/>
27 <property name="local.cache.dir" value="${build.home}/${build.local.repository}"/>
jeffliuc4ea6b02006-02-28 00:40:33 +000028 <property name="wtp.dir" value="${local.cache.dir}"/>
jeffliu20cbe5f2005-10-05 19:06:30 +000029 <property name="install.destination" value="${apiRoot}"/>
30 <antcall target="getDependencies"/>
jeffliuc4ea6b02006-02-28 00:40:33 +000031 <condition property="wtp-sdk" value="wtp-sdk-${buildId}.zip" else="wtp-sdk-${buildType}-${buildId}-${timestamp}.zip">
32 <available file="${wtp.dir}/wtp-sdk-${buildId}.zip"/>
33 </condition>
34 <condition property="wtp-wst-tests" value="wtp-wst-Automated-Tests-${buildId}.zip" else="wtp-wst-Automated-Tests-${buildType}-${buildId}-${timestamp}.zip">
35 <available file="${wtp.dir}/wtp-wst-Automated-Tests-${buildId}.zip"/>
36 </condition>
37 <condition property="wtp-jst-tests" value="wtp-jst-Automated-Tests-${buildId}.zip" else="wtp-jst-Automated-Tests-${buildType}-${buildId}-${timestamp}.zip">
38 <available file="${wtp.dir}/wtp-jst-Automated-Tests-${buildId}.zip"/>
39 </condition>
jeffliu20cbe5f2005-10-05 19:06:30 +000040 <antcall target="run"/>
41 </target>
42
43 <target name="getReleng">
44 <property name="releng.tag" value="v${buildType}${timestamp}"/>
45 <cvs
david_williams0e4fcd02005-11-06 20:10:58 +000046 cvsRoot=":pserver:anonymous@dev.eclipse.org:/cvsroot/webtools"
jeffliu20cbe5f2005-10-05 19:06:30 +000047 package="releng"
48 dest="${apiRoot}"
49 command="export"
50 tag="${releng.tag}"
51 />
52 </target>
53
54 <target name="getDependencies">
55 <antcall target="getAndInstall">
56 <param name="groupId" value="eclipse" />
57 </antcall>
jeffliu98217272005-10-07 21:27:07 +000058 <antcall target="getAndInstall">
59 <param name="groupId" value="eclipseTestFramework" />
60 <param name="clean" value="true" />
61 </antcall>
62 <antcall target="getAndInstall">
jeffliu20cbe5f2005-10-05 19:06:30 +000063 <param name="groupId" value="emf" />
64 </antcall>
jeffliu98217272005-10-07 21:27:07 +000065 <antcall target="getAndInstall">
jeffliu20cbe5f2005-10-05 19:06:30 +000066 <param name="groupId" value="gef" />
67 </antcall>
jeffliu98217272005-10-07 21:27:07 +000068 <antcall target="getAndInstall">
jeffliu20cbe5f2005-10-05 19:06:30 +000069 <param name="groupId" value="jem" />
70 </antcall>
jeffliu98217272005-10-07 21:27:07 +000071 <antcall target="getAndInstall">
72 <param name="groupId" value="tomcat.5" />
73 </antcall>
74 <antcall target="getAndInstall">
75 <param name="groupId" value="jonas.4" />
76 </antcall>
77 <antcall target="getAndInstall">
78 <param name="groupId" value="oagis.release" />
79 </antcall>
80 <antcall target="getAndInstall">
81 <param name="groupId" value="oagis.wsdl" />
82 </antcall>
83 <antcall target="get">
jeffliu7b325052006-03-16 21:06:55 +000084 <param name="groupId" value="eclipse" />
85 <param name="baseos" value="win32" />
86 <param name="basews" value="win32" />
87 <param name="basearch" value="x86" />
88 </antcall>
89 <antcall target="get">
jeffliu98217272005-10-07 21:27:07 +000090 <param name="groupId" value="tptp" />
91 </antcall>
92 <mkdir dir="${apiRoot}/piagent"/>
93 <condition property="isLinux">
94 <equals arg1="${baseos}" arg2="linux"/>
95 </condition>
96 <antcall target="setupPIAgent.linux"/>
97 <antcall target="setupPIAgent.win32"/>
98 <antcall target="getAndInstallWTP">
jeffliuc4ea6b02006-02-28 00:40:33 +000099 <param name="file" value="wtp-sdk-${buildId}.zip" />
jeffliu20cbe5f2005-10-05 19:06:30 +0000100 </antcall>
jeffliu98217272005-10-07 21:27:07 +0000101 <antcall target="getAndInstallWTP">
jeffliuc4ea6b02006-02-28 00:40:33 +0000102 <param name="file" value="wtp-sdk-${buildType}-${buildId}-${timestamp}.zip" />
jeffliu20cbe5f2005-10-05 19:06:30 +0000103 </antcall>
jeffliu98217272005-10-07 21:27:07 +0000104 <antcall target="getAndInstallWTP">
jeffliuc4ea6b02006-02-28 00:40:33 +0000105 <param name="file" value="wtp-wst-Automated-Tests-${buildId}.zip" />
106 </antcall>
107 <antcall target="getAndInstallWTP">
108 <param name="file" value="wtp-wst-Automated-Tests-${buildType}-${buildId}-${timestamp}.zip" />
109 </antcall>
110 <antcall target="getAndInstallWTP">
111 <param name="file" value="wtp-jst-Automated-Tests-${buildId}.zip" />
112 </antcall>
113 <antcall target="getAndInstallWTP">
114 <param name="file" value="wtp-jst-Automated-Tests-${buildType}-${buildId}-${timestamp}.zip" />
jeffliu20cbe5f2005-10-05 19:06:30 +0000115 </antcall>
jeffliu20cbe5f2005-10-05 19:06:30 +0000116 <delete file="${local.cache.dir}/wtp-apiscanner.zip"/>
117 <get src="http://download.eclipse.org/webtools/downloads/wtp-apiscanner.zip" dest="${local.cache.dir}/wtp-apiscanner.zip"/>
118 <unzip src="${local.cache.dir}/wtp-apiscanner.zip" dest="${apiRoot}"/>
119 </target>
120
121 <target name="get">
122 <property name="dependencyTargets" value="${build.home}/releng.wtpbuilder/scripts/dependency/build.xml"/>
123 <ant antfile="${dependencyTargets}" target="checkDependency">
124 <property name="groupId" value="${groupId}" />
125 </ant>
126 </target>
127
128 <target name="getAndInstall">
129 <property name="dependencyTargets" value="${build.home}/releng.wtpbuilder/scripts/dependency/build.xml"/>
130 <ant antfile="${dependencyTargets}" target="checkDependency">
131 <property name="groupId" value="${groupId}" />
132 </ant>
133 <ant antfile="${dependencyTargets}" target="installDependency">
134 <property name="groupId" value="${groupId}" />
135 </ant>
136 </target>
137
jeffliu98217272005-10-07 21:27:07 +0000138 <target name="getAndInstallWTP">
jeffliuc4ea6b02006-02-28 00:40:33 +0000139 <available file="${wtp.dir}/${file}" property="file.exists"/>
jeffliu98217272005-10-07 21:27:07 +0000140 <antcall target="getWTP"/>
jeffliu5b5e8d32006-03-07 22:20:08 +0000141 <available file="${wtp.dir}/${file}" property="file.exists"/>
jeffliuc4ea6b02006-02-28 00:40:33 +0000142 <antcall target="installWTP"/>
jeffliu98217272005-10-07 21:27:07 +0000143 </target>
144
jeffliu20cbe5f2005-10-05 19:06:30 +0000145 <target name="getWTP">
jeffliue942a942005-11-29 17:34:57 +0000146 <condition property="file.url" value="http://download.eclipse.org/webtools/committers/drops/${buildType}-${buildId}-${timestamp}" else="http://download.eclipse.org/webtools/downloads/drops/${buildType}-${buildId}-${timestamp}">
147 <isset property="build.committers"/>
148 </condition>
jeffliu20cbe5f2005-10-05 19:06:30 +0000149 <antcall target="getWTP2"/>
150 </target>
151
152 <target name="getWTP2" unless="file.exists">
153 <property name="file.url" value="http://download.eclipse.org/webtools/downloads/drops/${buildType}-${buildId}-${timestamp}"/>
154 <mkdir dir="${wtp.dir}"/>
jeffliuc4ea6b02006-02-28 00:40:33 +0000155 <get dest="${wtp.dir}/${file}" src="${file.url}/${file}" ignoreerrors="true"/>
156 </target>
157
158 <target name="installWTP" if="file.exists">
159 <unzip src="${wtp.dir}/${file}" dest="${install.destination}" overwrite="true"/>
jeffliu20cbe5f2005-10-05 19:06:30 +0000160 </target>
161
jeffliu98217272005-10-07 21:27:07 +0000162 <target name="setupPIAgent.linux" if="isLinux">
163 <unzip src="${local.cache.dir}/${tptp.file.linux-gtk-x86}" dest="${apiRoot}/piagent">
164 <patternset>
165 <include name="lib/*"/>
166 </patternset>
167 </unzip>
168 <move todir="${apiRoot}/piagent" flatten="true">
169 <fileset dir="${apiRoot}/piagent/lib"/>
170 </move>
171 </target>
172
173 <target name="setupPIAgent.win32" unless="isLinux">
174 <unzip src="${local.cache.dir}/${tptp.file.win32-win32-x86}" dest="${apiRoot}/piagent">
175 <patternset>
176 <include name="bin/*"/>
177 </patternset>
178 </unzip>
179 <move todir="${apiRoot}/piagent" flatten="true">
180 <fileset dir="${apiRoot}/piagent/bin"/>
181 </move>
182 </target>
183
jeffliu20cbe5f2005-10-05 19:06:30 +0000184 <target name="run">
jeffliuc4ea6b02006-02-28 00:40:33 +0000185 <cvs
186 cvsRoot=":pserver:anonymous@dev.eclipse.org:/cvsroot/webtools"
187 package="releng.builder/tools/apitools/adopter_usages"
188 dest="${apiRoot}"
189 command="export"
190 tag="HEAD"
191 />
192 <mkdir dir="${apiRoot}/adopters"/>
193 <antcall target="runEclipseApp">
194 <param name="application" value="org.eclipse.wtp.releng.tools.component.core.APIRefCompatibilityScanner"/>
jeffliu7b325052006-03-16 21:06:55 +0000195 <param name="vmargs" value="-Dsrc=${local.cache.dir}/${wtp-sdk},${local.cache.dir}/${eclipse.file.win32-win32-x86},${local.cache.dir}/${emf.file},${local.cache.dir}/${gef.file},${local.cache.dir}/${jem.file} -Duse=${apiRoot}/releng.builder/tools/apitools/adopter_usages -DoutputDir=${apiRoot}/adopters -Xmx256M"/>
jeffliuc4ea6b02006-02-28 00:40:33 +0000196 </antcall>
jeffliu925d2c92006-03-07 07:38:36 +0000197 <copy tofile="${apiRoot}/apiresults/api-ref-compatibility.html" file="${apiRoot}/adopters/api-ref-compatibility.html"/>
198 <copy tofile="${apiRoot}/apiresults/api-ref-compatibility.xml" file="${apiRoot}/adopters/api-ref-compatibility.xml"/>
jeffliuc4ea6b02006-02-28 00:40:33 +0000199
jeffliu20cbe5f2005-10-05 19:06:30 +0000200 <antcall target="runEclipseApp">
201 <param name="application" value="org.eclipse.wtp.releng.tools.component.core.Java2API"/>
jeffliu7b325052006-03-16 21:06:55 +0000202 <param name="vmargs" value="-Dsrc=${local.cache.dir}/${eclipse.file.win32-win32-x86} -DoutputDir=${apiRoot}/api-eclipse -Dexcludes=.*internal.*"/>
jeffliu20cbe5f2005-10-05 19:06:30 +0000203 </antcall>
204 <antcall target="runEclipseApp">
205 <param name="application" value="org.eclipse.wtp.releng.tools.component.core.Java2API"/>
206 <param name="vmargs" value="-Dsrc=${local.cache.dir}/${emf.file} -DoutputDir=${apiRoot}/api-emf -Dexcludes=.*internal.*"/>
207 </antcall>
208 <antcall target="runEclipseApp">
209 <param name="application" value="org.eclipse.wtp.releng.tools.component.core.Java2API"/>
210 <param name="vmargs" value="-Dsrc=${local.cache.dir}/${gef.file} -DoutputDir=${apiRoot}/api-gef -Dexcludes=.*internal.*"/>
211 </antcall>
212 <antcall target="runEclipseApp">
213 <param name="application" value="org.eclipse.wtp.releng.tools.component.core.Java2API"/>
214 <param name="vmargs" value="-Dsrc=${local.cache.dir}/${jem.file} -DoutputDir=${apiRoot}/api-jem -Dexcludes=.*internal.*"/>
215 </antcall>
216 <antcall target="runJavaMain">
217 <param name="classname" value="org.eclipse.wtp.releng.tools.component.violation.APIViolationScanner"/>
jeffliuc4ea6b02006-02-28 00:40:33 +0000218 <param name="args" value="-src ${local.cache.dir}/${wtp-sdk} -api ${apiRoot}/api-eclipse ${apiRoot}/api-emf ${apiRoot}/api-gef ${apiRoot}/api-jem -outputDir ${apiRoot}/apiresults -html -includes org.eclipse.* -excludes org.eclipse.wst.* org.eclipse.jst.* -debug"/>
jeffliu5ea46352005-10-07 18:22:40 +0000219 </antcall>
jeffliue942a942005-11-29 17:34:57 +0000220 <antcall target="runJavaMain">
221 <param name="classname" value="org.eclipse.wtp.releng.tools.component.api.API2ComponentAPI"/>
jeffliuc4ea6b02006-02-28 00:40:33 +0000222 <param name="args" value="-src ${local.cache.dir}/${wtp-sdk} -api ${local.cache.dir}/${wtp-sdk} -outputDir ${apiRoot}/apiresults -html"/>
jeffliue942a942005-11-29 17:34:57 +0000223 </antcall>
jeffliu5ea46352005-10-07 18:22:40 +0000224 <antcall target="runEclipseApp">
225 <param name="application" value="org.eclipse.wtp.releng.tools.component.core.JavadocScanner"/>
jeffliuc4ea6b02006-02-28 00:40:33 +0000226 <param name="vmargs" value="-Dsrc=${local.cache.dir}/${wtp-sdk} -DoutputDir=${apiRoot}/apiresults -Dapi=${local.cache.dir}/${wtp-sdk} -Dexcludes=.*internal.* -DskipAPIGen=true -Dhtml=true"/>
jeffliu20cbe5f2005-10-05 19:06:30 +0000227 </antcall>
jeffliue942a942005-11-29 17:34:57 +0000228 <antcall target="runJavaMain">
229 <param name="classname" value="org.eclipse.wtp.releng.tools.component.api.violation.NonAPIDependencyScanner"/>
jeffliuc4ea6b02006-02-28 00:40:33 +0000230 <param name="args" value="-src ${local.cache.dir}/${wtp-sdk} -api ${local.cache.dir}/${wtp-sdk} -outputDir ${apiRoot}/apiresults -refapi ${apiRoot}/api-eclipse ${apiRoot}/api-emf ${apiRoot}/api-gef ${apiRoot}/api-jem -includes org.eclipse.* -skipAPIGen"/>
jeffliue942a942005-11-29 17:34:57 +0000231 </antcall>
jeffliu98217272005-10-07 21:27:07 +0000232 <mkdir dir="${apiRoot}/results/consolelogs"/>
233 <copy todir="${apiRoot}" overwrite="true">
234 <fileset dir="${build.home}/releng.wtpbuilder/distribution/wtp.tests/testScripts"/>
235 </copy>
236 <copy file="${build.home}/releng.wtpbuilder/distribution/wtp.api/testScripts/test.xml" tofile="${apiRoot}/test.xml" overwrite="true"/>
237 <ant antfile="${build.home}/releng.wtpbuilder/distribution/wtp.tests/build.xml" target="runTestEclipse">
238 <property name="testRoot" value="${apiRoot}"/>
jeffliubbb80d22006-03-15 01:37:43 +0000239 <property name="testTarget" value="all"/>
jeffliu98217272005-10-07 21:27:07 +0000240 </ant>
jeffliuee9872f2005-10-20 01:51:18 +0000241 <antcall target="runJavaMain">
242 <param name="classname" value="org.eclipse.wtp.releng.tools.component.tptp.CodeCoverageScanner"/>
jeffliuc4ea6b02006-02-28 00:40:33 +0000243 <param name="args" value="-api ${local.cache.dir}/${wtp-sdk} -src ${local.cache.dir}/${wtp-sdk} ${local.cache.dir}/${wtp-wst-tests} ${local.cache.dir}/${wtp-jst-tests} -trcxml ${apiRoot}/apiresults/trcxml -outputDir ${apiRoot}/apiresults -skipAPIGen -html"/>
jeffliue942a942005-11-29 17:34:57 +0000244 </antcall>
jeffliuc4ea6b02006-02-28 00:40:33 +0000245
246 <cvs
247 cvsRoot=":pserver:anonymous@dev.eclipse.org:/cvsroot/webtools"
248 package="releng.builder/tools/apitools/api_progress"
249 dest="${apiRoot}"
250 command="export"
251 tag="HEAD"
252 />
jeffliue942a942005-11-29 17:34:57 +0000253 <antcall target="runJavaMain">
254 <param name="classname" value="org.eclipse.wtp.releng.tools.component.api.progress.APIProgressScanner"/>
jeffliuc4ea6b02006-02-28 00:40:33 +0000255 <param name="args" value="-api ${local.cache.dir}/${wtp-sdk} -src ${local.cache.dir}/${wtp-sdk} -outputDir ${apiRoot}/apiresults -progressDir ${apiRoot}/releng.builder/tools/apitools/api_progress/1.0 -timestamp ${timestamp} -excludes .*infopop .*doc.isv .*doc.user .*source org.eclipse.wst org.eclipse.jst"/>
jeffliuee9872f2005-10-20 01:51:18 +0000256 </antcall>
jeffliu20cbe5f2005-10-05 19:06:30 +0000257 </target>
258
259 <target name="runEclipseApp">
260 <property name="vmargs" value=""/>
261 <java classpath="${apiRoot}/eclipse/startup.jar" fork="true" classname="org.eclipse.core.launcher.Main" failonerror="true" timeout="3600000" dir="${apiRoot}">
262 <jvmarg value="-Dosgi.ws=${basews}" />
263 <jvmarg value="-Dosgi.os=${baseos}" />
264 <jvmarg value="-Dosgi.arch=${basearch}" />
265 <jvmarg value="-Dws=${basews}" />
266 <jvmarg value="-Dos=${baseos}" />
267 <jvmarg value="-Darch=${basearch}" />
268 <jvmarg value="-Xmx256M" />
269 <jvmarg line="${vmargs}" />
270 <arg value="-application" />
271 <arg value="${application}" />
272 </java>
273 </target>
274
275 <target name="runJavaMain">
276 <java fork="true" classname="${classname}" failonerror="false" timeout="3600000" dir="${apiRoot}">
277 <classpath>
278 <fileset dir="${apiRoot}/eclipse/plugins">
jeffliuc4ea6b02006-02-28 00:40:33 +0000279 <include name="**/org.eclipse.wtp.releng.tools.component.core*.jar"/>
280 </fileset>
281 <fileset dir="${apiRoot}/lib">
jeffliu20cbe5f2005-10-05 19:06:30 +0000282 <include name="**/org.eclipse.jdt.core*.jar"/>
283 <include name="**/org.eclipse.core.runtime*.jar"/>
jeffliue942a942005-11-29 17:34:57 +0000284 <include name="**/org.eclipse.core.resources*.jar"/>
285 <include name="**/org.eclipse.text*.jar"/>
jeffliu20cbe5f2005-10-05 19:06:30 +0000286 </fileset>
287 </classpath>
288 <jvmarg value="-Xmx256M"/>
289 <arg line="${args}"/>
290 </java>
291 </target>
292
jeffliu925d2c92006-03-07 07:38:36 +0000293 <target name="upload" if="login">
294 <condition property="upload.path"
295 else="${login}@download1.eclipse.org:~/downloads/webtools/downloads/drops/${buildType}-${buildId}-${timestamp}"
296 value="${login}@download1.eclipse.org:~/downloads/webtools/committers/drops/${buildType}-${buildId}-${timestamp}">
297 <isset property="build.committers"/>
298 </condition>
299 <exec executable="scp" dir="${build.home}">
jeffliudcf88c42006-03-31 17:19:44 +0000300 <arg line="-r ./apiRoot/apiresults ${upload.path}"/>
jeffliu925d2c92006-03-07 07:38:36 +0000301 </exec>
jeffliu7c7e7242006-05-01 20:30:52 +0000302 <mkdir dir="${build.home}/archives"/>
303 <zip destfile="${build.home}/archives/${buildType}-${buildId}-${timestamp}.zip" basedir="${build.home}/apiRoot/apiresults"/>
jeffliu925d2c92006-03-07 07:38:36 +0000304 </target>
305
jeffliuc4ea6b02006-02-28 00:40:33 +0000306 <target name="clean" if="clean">
jeffliu568eaef2006-05-02 06:51:18 +0000307 <property file="${build.home}/releng.wtpbuilder/build.properties"/>
jeffliu7c7e7242006-05-01 20:30:52 +0000308 <property name="local.cache.dir" value="${build.home}/${build.local.repository}"/>
jeffliu7c7e7242006-05-01 20:30:52 +0000309 <property name="apiRoot" value="${build.home}/apiRoot"/>
jeffliu568eaef2006-05-02 06:51:18 +0000310 <property name="wtp.dir" value="${local.cache.dir}"/>
jeffliuc4ea6b02006-02-28 00:40:33 +0000311 <delete dir="${apiRoot}" failonerror="false"/>
jeffliu7c7e7242006-05-01 20:30:52 +0000312 <delete failonerror="false">
313 <fileset dir="${wtp.dir}" includes="wtp-*"/>
314 </delete>
jeffliuc4ea6b02006-02-28 00:40:33 +0000315 </target>
316
jeffliu20cbe5f2005-10-05 19:06:30 +0000317</project>