blob: 379cc7c14758ae6b9cf5a4535e9d3cf4d4ae9870 [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"/>
22 <property name="apiRoot" value="${wtp.api}/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"/>
jeffliuc4ea6b02006-02-28 00:40:33 +000041 <antcall target="clean"/>
jeffliu20cbe5f2005-10-05 19:06:30 +000042 </target>
43
44 <target name="getReleng">
45 <property name="releng.tag" value="v${buildType}${timestamp}"/>
46 <cvs
david_williams0e4fcd02005-11-06 20:10:58 +000047 cvsRoot=":pserver:anonymous@dev.eclipse.org:/cvsroot/webtools"
jeffliu20cbe5f2005-10-05 19:06:30 +000048 package="releng"
49 dest="${apiRoot}"
50 command="export"
51 tag="${releng.tag}"
52 />
53 </target>
54
55 <target name="getDependencies">
56 <antcall target="getAndInstall">
57 <param name="groupId" value="eclipse" />
58 </antcall>
jeffliu98217272005-10-07 21:27:07 +000059 <antcall target="getAndInstall">
60 <param name="groupId" value="eclipseTestFramework" />
61 <param name="clean" value="true" />
62 </antcall>
63 <antcall target="getAndInstall">
jeffliu20cbe5f2005-10-05 19:06:30 +000064 <param name="groupId" value="emf" />
65 </antcall>
jeffliu98217272005-10-07 21:27:07 +000066 <antcall target="getAndInstall">
jeffliu20cbe5f2005-10-05 19:06:30 +000067 <param name="groupId" value="gef" />
68 </antcall>
jeffliu98217272005-10-07 21:27:07 +000069 <antcall target="getAndInstall">
jeffliu20cbe5f2005-10-05 19:06:30 +000070 <param name="groupId" value="jem" />
71 </antcall>
jeffliu98217272005-10-07 21:27:07 +000072 <antcall target="getAndInstall">
73 <param name="groupId" value="tomcat.5" />
74 </antcall>
75 <antcall target="getAndInstall">
76 <param name="groupId" value="jonas.4" />
77 </antcall>
78 <antcall target="getAndInstall">
79 <param name="groupId" value="oagis.release" />
80 </antcall>
81 <antcall target="getAndInstall">
82 <param name="groupId" value="oagis.wsdl" />
83 </antcall>
84 <antcall target="get">
85 <param name="groupId" value="tptp" />
86 </antcall>
87 <mkdir dir="${apiRoot}/piagent"/>
88 <condition property="isLinux">
89 <equals arg1="${baseos}" arg2="linux"/>
90 </condition>
91 <antcall target="setupPIAgent.linux"/>
92 <antcall target="setupPIAgent.win32"/>
93 <antcall target="getAndInstallWTP">
jeffliuc4ea6b02006-02-28 00:40:33 +000094 <param name="file" value="wtp-sdk-${buildId}.zip" />
jeffliu20cbe5f2005-10-05 19:06:30 +000095 </antcall>
jeffliu98217272005-10-07 21:27:07 +000096 <antcall target="getAndInstallWTP">
jeffliuc4ea6b02006-02-28 00:40:33 +000097 <param name="file" value="wtp-sdk-${buildType}-${buildId}-${timestamp}.zip" />
jeffliu20cbe5f2005-10-05 19:06:30 +000098 </antcall>
jeffliu98217272005-10-07 21:27:07 +000099 <antcall target="getAndInstallWTP">
jeffliuc4ea6b02006-02-28 00:40:33 +0000100 <param name="file" value="wtp-wst-Automated-Tests-${buildId}.zip" />
101 </antcall>
102 <antcall target="getAndInstallWTP">
103 <param name="file" value="wtp-wst-Automated-Tests-${buildType}-${buildId}-${timestamp}.zip" />
104 </antcall>
105 <antcall target="getAndInstallWTP">
106 <param name="file" value="wtp-jst-Automated-Tests-${buildId}.zip" />
107 </antcall>
108 <antcall target="getAndInstallWTP">
109 <param name="file" value="wtp-jst-Automated-Tests-${buildType}-${buildId}-${timestamp}.zip" />
jeffliu20cbe5f2005-10-05 19:06:30 +0000110 </antcall>
jeffliu20cbe5f2005-10-05 19:06:30 +0000111 <delete file="${local.cache.dir}/wtp-apiscanner.zip"/>
112 <get src="http://download.eclipse.org/webtools/downloads/wtp-apiscanner.zip" dest="${local.cache.dir}/wtp-apiscanner.zip"/>
113 <unzip src="${local.cache.dir}/wtp-apiscanner.zip" dest="${apiRoot}"/>
114 </target>
115
116 <target name="get">
117 <property name="dependencyTargets" value="${build.home}/releng.wtpbuilder/scripts/dependency/build.xml"/>
118 <ant antfile="${dependencyTargets}" target="checkDependency">
119 <property name="groupId" value="${groupId}" />
120 </ant>
121 </target>
122
123 <target name="getAndInstall">
124 <property name="dependencyTargets" value="${build.home}/releng.wtpbuilder/scripts/dependency/build.xml"/>
125 <ant antfile="${dependencyTargets}" target="checkDependency">
126 <property name="groupId" value="${groupId}" />
127 </ant>
128 <ant antfile="${dependencyTargets}" target="installDependency">
129 <property name="groupId" value="${groupId}" />
130 </ant>
131 </target>
132
jeffliu98217272005-10-07 21:27:07 +0000133 <target name="getAndInstallWTP">
jeffliuc4ea6b02006-02-28 00:40:33 +0000134 <available file="${wtp.dir}/${file}" property="file.exists"/>
jeffliu98217272005-10-07 21:27:07 +0000135 <antcall target="getWTP"/>
jeffliuc4ea6b02006-02-28 00:40:33 +0000136 <antcall target="installWTP"/>
jeffliu98217272005-10-07 21:27:07 +0000137 </target>
138
jeffliu20cbe5f2005-10-05 19:06:30 +0000139 <target name="getWTP">
jeffliue942a942005-11-29 17:34:57 +0000140 <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}">
141 <isset property="build.committers"/>
142 </condition>
jeffliu20cbe5f2005-10-05 19:06:30 +0000143 <antcall target="getWTP2"/>
144 </target>
145
146 <target name="getWTP2" unless="file.exists">
147 <property name="file.url" value="http://download.eclipse.org/webtools/downloads/drops/${buildType}-${buildId}-${timestamp}"/>
148 <mkdir dir="${wtp.dir}"/>
jeffliuc4ea6b02006-02-28 00:40:33 +0000149 <get dest="${wtp.dir}/${file}" src="${file.url}/${file}" ignoreerrors="true"/>
150 </target>
151
152 <target name="installWTP" if="file.exists">
153 <unzip src="${wtp.dir}/${file}" dest="${install.destination}" overwrite="true"/>
jeffliu20cbe5f2005-10-05 19:06:30 +0000154 </target>
155
jeffliu98217272005-10-07 21:27:07 +0000156 <target name="setupPIAgent.linux" if="isLinux">
157 <unzip src="${local.cache.dir}/${tptp.file.linux-gtk-x86}" dest="${apiRoot}/piagent">
158 <patternset>
159 <include name="lib/*"/>
160 </patternset>
161 </unzip>
162 <move todir="${apiRoot}/piagent" flatten="true">
163 <fileset dir="${apiRoot}/piagent/lib"/>
164 </move>
165 </target>
166
167 <target name="setupPIAgent.win32" unless="isLinux">
168 <unzip src="${local.cache.dir}/${tptp.file.win32-win32-x86}" dest="${apiRoot}/piagent">
169 <patternset>
170 <include name="bin/*"/>
171 </patternset>
172 </unzip>
173 <move todir="${apiRoot}/piagent" flatten="true">
174 <fileset dir="${apiRoot}/piagent/bin"/>
175 </move>
176 </target>
177
jeffliu20cbe5f2005-10-05 19:06:30 +0000178 <target name="run">
179 <condition property="eclipse.file" value="${eclipse.file.linux-gtk-x86}" else="${eclipse.file.win32-win32-x86}">
180 <equals arg1="${baseos}" arg2="linux"/>
181 </condition>
jeffliuc4ea6b02006-02-28 00:40:33 +0000182
183 <cvs
184 cvsRoot=":pserver:anonymous@dev.eclipse.org:/cvsroot/webtools"
185 package="releng.builder/tools/apitools/adopter_usages"
186 dest="${apiRoot}"
187 command="export"
188 tag="HEAD"
189 />
190 <mkdir dir="${apiRoot}/adopters"/>
191 <antcall target="runEclipseApp">
192 <param name="application" value="org.eclipse.wtp.releng.tools.component.core.APIRefCompatibilityScanner"/>
193 <param name="vmargs" value="-Dsrc=${local.cache.dir}/${wtp-sdk},${local.cache.dir}/${eclipse.file},${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"/>
194 </antcall>
195 <copyfile dest="${apiRoot}/apiresults/api-ref-compatibility.html" src="${apiRoot}/adopters/api-ref-compatibility.html"/>
196 <copyfile dest="${apiRoot}/apiresults/api-ref-compatibility.xml" src="${apiRoot}/adopters/api-ref-compatibility.xml"/>
197
jeffliu20cbe5f2005-10-05 19:06:30 +0000198 <antcall target="runEclipseApp">
199 <param name="application" value="org.eclipse.wtp.releng.tools.component.core.Java2API"/>
200 <param name="vmargs" value="-Dsrc=${local.cache.dir}/${eclipse.file} -DoutputDir=${apiRoot}/api-eclipse -Dexcludes=.*internal.*"/>
201 </antcall>
202 <antcall target="runEclipseApp">
203 <param name="application" value="org.eclipse.wtp.releng.tools.component.core.Java2API"/>
204 <param name="vmargs" value="-Dsrc=${local.cache.dir}/${emf.file} -DoutputDir=${apiRoot}/api-emf -Dexcludes=.*internal.*"/>
205 </antcall>
206 <antcall target="runEclipseApp">
207 <param name="application" value="org.eclipse.wtp.releng.tools.component.core.Java2API"/>
208 <param name="vmargs" value="-Dsrc=${local.cache.dir}/${gef.file} -DoutputDir=${apiRoot}/api-gef -Dexcludes=.*internal.*"/>
209 </antcall>
210 <antcall target="runEclipseApp">
211 <param name="application" value="org.eclipse.wtp.releng.tools.component.core.Java2API"/>
212 <param name="vmargs" value="-Dsrc=${local.cache.dir}/${jem.file} -DoutputDir=${apiRoot}/api-jem -Dexcludes=.*internal.*"/>
213 </antcall>
214 <antcall target="runJavaMain">
215 <param name="classname" value="org.eclipse.wtp.releng.tools.component.violation.APIViolationScanner"/>
jeffliuc4ea6b02006-02-28 00:40:33 +0000216 <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 +0000217 </antcall>
jeffliue942a942005-11-29 17:34:57 +0000218 <antcall target="runJavaMain">
219 <param name="classname" value="org.eclipse.wtp.releng.tools.component.api.API2ComponentAPI"/>
jeffliuc4ea6b02006-02-28 00:40:33 +0000220 <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 +0000221 </antcall>
jeffliu5ea46352005-10-07 18:22:40 +0000222 <antcall target="runEclipseApp">
223 <param name="application" value="org.eclipse.wtp.releng.tools.component.core.JavadocScanner"/>
jeffliuc4ea6b02006-02-28 00:40:33 +0000224 <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 +0000225 </antcall>
jeffliue942a942005-11-29 17:34:57 +0000226 <antcall target="runJavaMain">
227 <param name="classname" value="org.eclipse.wtp.releng.tools.component.api.violation.NonAPIDependencyScanner"/>
jeffliuc4ea6b02006-02-28 00:40:33 +0000228 <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 +0000229 </antcall>
jeffliu98217272005-10-07 21:27:07 +0000230 <mkdir dir="${apiRoot}/results/consolelogs"/>
231 <copy todir="${apiRoot}" overwrite="true">
232 <fileset dir="${build.home}/releng.wtpbuilder/distribution/wtp.tests/testScripts"/>
233 </copy>
234 <copy file="${build.home}/releng.wtpbuilder/distribution/wtp.api/testScripts/test.xml" tofile="${apiRoot}/test.xml" overwrite="true"/>
235 <ant antfile="${build.home}/releng.wtpbuilder/distribution/wtp.tests/build.xml" target="runTestEclipse">
236 <property name="testRoot" value="${apiRoot}"/>
237 <property name="testTarget" value=""/>
238 </ant>
jeffliuee9872f2005-10-20 01:51:18 +0000239 <antcall target="runJavaMain">
240 <param name="classname" value="org.eclipse.wtp.releng.tools.component.tptp.CodeCoverageScanner"/>
jeffliuc4ea6b02006-02-28 00:40:33 +0000241 <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 +0000242 </antcall>
jeffliuc4ea6b02006-02-28 00:40:33 +0000243
244 <cvs
245 cvsRoot=":pserver:anonymous@dev.eclipse.org:/cvsroot/webtools"
246 package="releng.builder/tools/apitools/api_progress"
247 dest="${apiRoot}"
248 command="export"
249 tag="HEAD"
250 />
jeffliue942a942005-11-29 17:34:57 +0000251 <antcall target="runJavaMain">
252 <param name="classname" value="org.eclipse.wtp.releng.tools.component.api.progress.APIProgressScanner"/>
jeffliuc4ea6b02006-02-28 00:40:33 +0000253 <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 +0000254 </antcall>
jeffliuc4ea6b02006-02-28 00:40:33 +0000255
256 <zip destfile="${wtp.api}/apiresults-${buildId}.zip">
257 <fileset dir="${apiRoot}/apiresults">
258 <include name="**/*"/>
259 </fileset>
260 </zip>
jeffliu20cbe5f2005-10-05 19:06:30 +0000261 </target>
262
263 <target name="runEclipseApp">
264 <property name="vmargs" value=""/>
265 <java classpath="${apiRoot}/eclipse/startup.jar" fork="true" classname="org.eclipse.core.launcher.Main" failonerror="true" timeout="3600000" dir="${apiRoot}">
266 <jvmarg value="-Dosgi.ws=${basews}" />
267 <jvmarg value="-Dosgi.os=${baseos}" />
268 <jvmarg value="-Dosgi.arch=${basearch}" />
269 <jvmarg value="-Dws=${basews}" />
270 <jvmarg value="-Dos=${baseos}" />
271 <jvmarg value="-Darch=${basearch}" />
272 <jvmarg value="-Xmx256M" />
273 <jvmarg line="${vmargs}" />
274 <arg value="-application" />
275 <arg value="${application}" />
276 </java>
277 </target>
278
279 <target name="runJavaMain">
280 <java fork="true" classname="${classname}" failonerror="false" timeout="3600000" dir="${apiRoot}">
281 <classpath>
282 <fileset dir="${apiRoot}/eclipse/plugins">
jeffliuc4ea6b02006-02-28 00:40:33 +0000283 <include name="**/org.eclipse.wtp.releng.tools.component.core*.jar"/>
284 </fileset>
285 <fileset dir="${apiRoot}/lib">
jeffliu20cbe5f2005-10-05 19:06:30 +0000286 <include name="**/org.eclipse.jdt.core*.jar"/>
287 <include name="**/org.eclipse.core.runtime*.jar"/>
jeffliue942a942005-11-29 17:34:57 +0000288 <include name="**/org.eclipse.core.resources*.jar"/>
289 <include name="**/org.eclipse.text*.jar"/>
jeffliu20cbe5f2005-10-05 19:06:30 +0000290 </fileset>
291 </classpath>
292 <jvmarg value="-Xmx256M"/>
293 <arg line="${args}"/>
294 </java>
295 </target>
296
jeffliuc4ea6b02006-02-28 00:40:33 +0000297 <target name="clean" if="clean">
298 <delete dir="${apiRoot}" failonerror="false"/>
299 <delete file="${wtp.dir}/${wtp-sdk}" failonerror="false"/>
300 <delete file="${wtp.dir}/${wtp-wst-tests}" failonerror="false"/>
301 <delete file="${wtp.dir}/${wtp-jst-tests}" failonerror="false"/>
302 </target>
303
jeffliu20cbe5f2005-10-05 19:06:30 +0000304</project>