blob: 27cab1cab6b09f82c4107f795b5fe568c571f974 [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
13 releng.tag [optional]
14 wtp.dir [optional]
15 -->
16
17 <target name="main">
18 <property file="${build.home}/releng.wtpbuilder/build.properties"/>
19 <property name="wtp.api" value="${build.home}/releng.wtpbuilder/distribution/wtp.api"/>
20 <property name="apiRoot" value="${wtp.api}/apiRoot"/>
21 <mkdir dir="${apiRoot}"/>
22 <antcall target="getReleng"/>
23 <property file="${apiRoot}/releng/maps/dependencies.properties"/>
24 <property name="local.cache.dir" value="${build.home}/${build.local.repository}"/>
25 <property name="install.destination" value="${apiRoot}"/>
26 <antcall target="getDependencies"/>
27 <antcall target="run"/>
28 </target>
29
30 <target name="getReleng">
31 <property name="releng.tag" value="v${buildType}${timestamp}"/>
32 <cvs
33 cvsRoot=":pserver:anonymous@dev.eclipse.org:/home/webtools"
34 package="releng"
35 dest="${apiRoot}"
36 command="export"
37 tag="${releng.tag}"
38 />
39 </target>
40
41 <target name="getDependencies">
42 <antcall target="getAndInstall">
43 <param name="groupId" value="eclipse" />
44 </antcall>
jeffliu98217272005-10-07 21:27:07 +000045 <antcall target="getAndInstall">
46 <param name="groupId" value="eclipseTestFramework" />
47 <param name="clean" value="true" />
48 </antcall>
49 <antcall target="getAndInstall">
jeffliu20cbe5f2005-10-05 19:06:30 +000050 <param name="groupId" value="emf" />
51 </antcall>
jeffliu98217272005-10-07 21:27:07 +000052 <antcall target="getAndInstall">
jeffliu20cbe5f2005-10-05 19:06:30 +000053 <param name="groupId" value="gef" />
54 </antcall>
jeffliu98217272005-10-07 21:27:07 +000055 <antcall target="getAndInstall">
jeffliu20cbe5f2005-10-05 19:06:30 +000056 <param name="groupId" value="jem" />
57 </antcall>
jeffliu98217272005-10-07 21:27:07 +000058 <antcall target="getAndInstall">
59 <param name="groupId" value="tomcat.5" />
60 </antcall>
61 <antcall target="getAndInstall">
62 <param name="groupId" value="jonas.4" />
63 </antcall>
64 <antcall target="getAndInstall">
65 <param name="groupId" value="oagis.release" />
66 </antcall>
67 <antcall target="getAndInstall">
68 <param name="groupId" value="oagis.wsdl" />
69 </antcall>
70 <antcall target="get">
71 <param name="groupId" value="tptp" />
72 </antcall>
73 <mkdir dir="${apiRoot}/piagent"/>
74 <condition property="isLinux">
75 <equals arg1="${baseos}" arg2="linux"/>
76 </condition>
77 <antcall target="setupPIAgent.linux"/>
78 <antcall target="setupPIAgent.win32"/>
79 <antcall target="getAndInstallWTP">
jeffliu5ea46352005-10-07 18:22:40 +000080 <param name="file" value="wtp-sdk-${buildId}.zip" />
jeffliu20cbe5f2005-10-05 19:06:30 +000081 </antcall>
jeffliu98217272005-10-07 21:27:07 +000082 <antcall target="getAndInstallWTP">
jeffliu20cbe5f2005-10-05 19:06:30 +000083 <param name="file" value="wtp-wst-Automated-Tests-${buildId}.zip" />
84 </antcall>
jeffliu98217272005-10-07 21:27:07 +000085 <antcall target="getAndInstallWTP">
jeffliu20cbe5f2005-10-05 19:06:30 +000086 <param name="file" value="wtp-jst-Automated-Tests-${buildId}.zip" />
87 </antcall>
88 <antcall target="getWTP">
89 <param name="file" value="wtp-wst-perf-Tests-${buildId}.zip" />
90 </antcall>
91 <antcall target="getWTP">
92 <param name="file" value="wtp-jst-perf-Tests-${buildId}.zip" />
93 </antcall>
94 <delete file="${local.cache.dir}/wtp-apiscanner.zip"/>
95 <get src="http://download.eclipse.org/webtools/downloads/wtp-apiscanner.zip" dest="${local.cache.dir}/wtp-apiscanner.zip"/>
96 <unzip src="${local.cache.dir}/wtp-apiscanner.zip" dest="${apiRoot}"/>
97 </target>
98
99 <target name="get">
100 <property name="dependencyTargets" value="${build.home}/releng.wtpbuilder/scripts/dependency/build.xml"/>
101 <ant antfile="${dependencyTargets}" target="checkDependency">
102 <property name="groupId" value="${groupId}" />
103 </ant>
104 </target>
105
106 <target name="getAndInstall">
107 <property name="dependencyTargets" value="${build.home}/releng.wtpbuilder/scripts/dependency/build.xml"/>
108 <ant antfile="${dependencyTargets}" target="checkDependency">
109 <property name="groupId" value="${groupId}" />
110 </ant>
111 <ant antfile="${dependencyTargets}" target="installDependency">
112 <property name="groupId" value="${groupId}" />
113 </ant>
114 </target>
115
jeffliu98217272005-10-07 21:27:07 +0000116 <target name="getAndInstallWTP">
117 <property name="wtp.dir" value="${local.cache.dir}"/>
118 <antcall target="getWTP"/>
119 <unzip src="${wtp.dir}/${file}" dest="${install.destination}" overwrite="true"/>
120 </target>
121
jeffliu20cbe5f2005-10-05 19:06:30 +0000122 <target name="getWTP">
123 <property name="wtp.dir" value="${local.cache.dir}"/>
124 <available file="${wtp.dir}/${file}" property="file.exists"/>
125 <antcall target="getWTP2"/>
126 </target>
127
128 <target name="getWTP2" unless="file.exists">
129 <property name="file.url" value="http://download.eclipse.org/webtools/downloads/drops/${buildType}-${buildId}-${timestamp}"/>
130 <mkdir dir="${wtp.dir}"/>
131 <get dest="${wtp.dir}/${file}" src="${file.url}/${file}"/>
132 </target>
133
jeffliu98217272005-10-07 21:27:07 +0000134
135 <target name="setupPIAgent.linux" if="isLinux">
136 <unzip src="${local.cache.dir}/${tptp.file.linux-gtk-x86}" dest="${apiRoot}/piagent">
137 <patternset>
138 <include name="lib/*"/>
139 </patternset>
140 </unzip>
141 <move todir="${apiRoot}/piagent" flatten="true">
142 <fileset dir="${apiRoot}/piagent/lib"/>
143 </move>
144 </target>
145
146 <target name="setupPIAgent.win32" unless="isLinux">
147 <unzip src="${local.cache.dir}/${tptp.file.win32-win32-x86}" dest="${apiRoot}/piagent">
148 <patternset>
149 <include name="bin/*"/>
150 </patternset>
151 </unzip>
152 <move todir="${apiRoot}/piagent" flatten="true">
153 <fileset dir="${apiRoot}/piagent/bin"/>
154 </move>
155 </target>
156
jeffliu20cbe5f2005-10-05 19:06:30 +0000157 <target name="run">
158 <condition property="eclipse.file" value="${eclipse.file.linux-gtk-x86}" else="${eclipse.file.win32-win32-x86}">
159 <equals arg1="${baseos}" arg2="linux"/>
160 </condition>
161 <antcall target="runEclipseApp">
162 <param name="application" value="org.eclipse.wtp.releng.tools.component.core.Java2API"/>
163 <param name="vmargs" value="-Dsrc=${local.cache.dir}/${eclipse.file} -DoutputDir=${apiRoot}/api-eclipse -Dexcludes=.*internal.*"/>
164 </antcall>
165 <antcall target="runEclipseApp">
166 <param name="application" value="org.eclipse.wtp.releng.tools.component.core.Java2API"/>
167 <param name="vmargs" value="-Dsrc=${local.cache.dir}/${emf.file} -DoutputDir=${apiRoot}/api-emf -Dexcludes=.*internal.*"/>
168 </antcall>
169 <antcall target="runEclipseApp">
170 <param name="application" value="org.eclipse.wtp.releng.tools.component.core.Java2API"/>
171 <param name="vmargs" value="-Dsrc=${local.cache.dir}/${gef.file} -DoutputDir=${apiRoot}/api-gef -Dexcludes=.*internal.*"/>
172 </antcall>
173 <antcall target="runEclipseApp">
174 <param name="application" value="org.eclipse.wtp.releng.tools.component.core.Java2API"/>
175 <param name="vmargs" value="-Dsrc=${local.cache.dir}/${jem.file} -DoutputDir=${apiRoot}/api-jem -Dexcludes=.*internal.*"/>
176 </antcall>
177 <antcall target="runJavaMain">
178 <param name="classname" value="org.eclipse.wtp.releng.tools.component.violation.APIViolationScanner"/>
jeffliu5ea46352005-10-07 18:22:40 +0000179 <param name="args" value="-src ${local.cache.dir}/wtp-sdk-${buildId}.zip -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"/>
180 </antcall>
181 <antcall target="runEclipseApp">
182 <param name="application" value="org.eclipse.wtp.releng.tools.component.core.JavadocScanner"/>
183 <param name="vmargs" value="-Dsrc=${local.cache.dir}/wtp-sdk-${buildId}.zip -DoutputDir=${apiRoot}/apiresults -Dapi=${local.cache.dir}/wtp-sdk-${buildId}.zip -Dexcludes=.*internal.* -Dhtml"/>
jeffliu20cbe5f2005-10-05 19:06:30 +0000184 </antcall>
jeffliu98217272005-10-07 21:27:07 +0000185 <mkdir dir="${apiRoot}/results/consolelogs"/>
186 <copy todir="${apiRoot}" overwrite="true">
187 <fileset dir="${build.home}/releng.wtpbuilder/distribution/wtp.tests/testScripts"/>
188 </copy>
189 <copy file="${build.home}/releng.wtpbuilder/distribution/wtp.api/testScripts/test.xml" tofile="${apiRoot}/test.xml" overwrite="true"/>
190 <ant antfile="${build.home}/releng.wtpbuilder/distribution/wtp.tests/build.xml" target="runTestEclipse">
191 <property name="testRoot" value="${apiRoot}"/>
192 <property name="testTarget" value=""/>
193 </ant>
jeffliuee9872f2005-10-20 01:51:18 +0000194 <antcall target="runJavaMain">
195 <param name="classname" value="org.eclipse.wtp.releng.tools.component.tptp.CodeCoverageScanner"/>
196 <param name="args" value="-api ${local.cache.dir}/wtp-sdk-${buildId}.zip -src ${local.cache.dir}/wtp-sdk-${buildId}.zip -trcxml ${apiRoot}/apiresults/trcxml -outputDir ${apiRoot}/apiresults -skipAPIGen -html"/>
197 </antcall>
jeffliu20cbe5f2005-10-05 19:06:30 +0000198 </target>
199
200 <target name="runEclipseApp">
201 <property name="vmargs" value=""/>
202 <java classpath="${apiRoot}/eclipse/startup.jar" fork="true" classname="org.eclipse.core.launcher.Main" failonerror="true" timeout="3600000" dir="${apiRoot}">
203 <jvmarg value="-Dosgi.ws=${basews}" />
204 <jvmarg value="-Dosgi.os=${baseos}" />
205 <jvmarg value="-Dosgi.arch=${basearch}" />
206 <jvmarg value="-Dws=${basews}" />
207 <jvmarg value="-Dos=${baseos}" />
208 <jvmarg value="-Darch=${basearch}" />
209 <jvmarg value="-Xmx256M" />
210 <jvmarg line="${vmargs}" />
211 <arg value="-application" />
212 <arg value="${application}" />
213 </java>
214 </target>
215
216 <target name="runJavaMain">
217 <java fork="true" classname="${classname}" failonerror="false" timeout="3600000" dir="${apiRoot}">
218 <classpath>
219 <fileset dir="${apiRoot}/eclipse/plugins">
220 <include name="**/org.eclipse.jdt.core*.jar"/>
221 <include name="**/org.eclipse.core.runtime*.jar"/>
222 <include name="**/org.eclipse.wtp.releng.tools.component.core*.jar"/>
223 </fileset>
224 </classpath>
225 <jvmarg value="-Xmx256M"/>
226 <arg line="${args}"/>
227 </java>
228 </target>
229
230</project>