blob: 9377d9b28e3cf251bd87ccb4650af0a8dff12dd1 [file] [log] [blame]
david_williams42f9b242006-11-27 18:45:14 +00001<?xml version="1.0" encoding="UTF-8"?>
david_williams2171a5b2008-02-10 08:15:08 +00002<project
3 name="runbuild"
4 default="runbuild"
5 basedir=".">
david_williams42f9b242006-11-27 18:45:14 +00006
david_williamsab8b6082009-11-21 19:28:32 +00007
8 <!-- main -->
david_williamsef62fc42011-03-18 02:33:39 +00009 <target
10 name="runbuild"
11 depends="init">
david_williams2171a5b2008-02-10 08:15:08 +000012 <dirname
13 file="${ant.file}"
david_williamsab8b6082009-11-21 19:28:32 +000014 property="scripts.build.dir"/>
david_williams2171a5b2008-02-10 08:15:08 +000015 <property
16 name="wtp.builder.home"
david_williamsab8b6082009-11-21 19:28:32 +000017 value="${scripts.build.dir}/../../.."/>
david_williams1e71b282008-03-10 10:12:40 +000018
david_williamsa7324e42011-03-06 00:00:01 +000019 <!-- invoke runEclipseBuild to invokde antBuidler (just in case we
20 are not in ant builder, already) -->
david_williamsef62fc42011-03-18 02:33:39 +000021 <antcall target="runEclipseBuild"/>
david_williamsa7324e42011-03-06 00:00:01 +000022
23 <!-- fast fail, if serious problem indicated in output logs -->
24 <ant antfile="${wtp.builder.home}/scripts/build/checkForFastFail.xml"/>
25
david_williams2171a5b2008-02-10 08:15:08 +000026 </target>
27 <target
28 name="build"
david_williamsb0d8e732009-05-20 05:40:43 +000029 depends="init"
david_williamsab8b6082009-11-21 19:28:32 +000030 if="doBuild">
31 <!--
32 this property required as of Eclipse 3.0 stream builds >
33 20031126
34 -->
david_williams2171a5b2008-02-10 08:15:08 +000035 <property
36 name="buildingOSGi"
david_williamsab8b6082009-11-21 19:28:32 +000037 value="true"/>
38 <!--
39 this generateFeatureVersionSuffix property causes feature
40 suffixes to be calcuated based on their own CVS tag, plus
41 the qualifier of their contained plugins
42 -->
43 <!--
44 https://bugs.eclipse.org/bugs/show_bug.cgi?id=138825 false
45 for builds intended for 3.1.2, since can generate
46 underscores true for builds instended for 3.2
david_williams42f9b242006-11-27 18:45:14 +000047 -->
david_williams2171a5b2008-02-10 08:15:08 +000048 <property
49 name="generateFeatureVersionSuffix"
david_williamsab8b6082009-11-21 19:28:32 +000050 value="true"/>
david_williams2171a5b2008-02-10 08:15:08 +000051 <property
52 name="outputUpdateJars"
david_williamsab8b6082009-11-21 19:28:32 +000053 value="true"/>
david_williams2171a5b2008-02-10 08:15:08 +000054 <property
55 name="runPackager"
david_williamsab8b6082009-11-21 19:28:32 +000056 value="true"/>
david_williams52d0fc02007-05-06 06:08:38 +000057
david_williamsab8b6082009-11-21 19:28:32 +000058 <!--run the build for the specified component-->
david_williams2171a5b2008-02-10 08:15:08 +000059 <echo
60 level="debug"
david_williamsab8b6082009-11-21 19:28:32 +000061 message="basedir: ${basedir}"/>
david_williams2171a5b2008-02-10 08:15:08 +000062 <echo
63 level="debug"
david_williamsab8b6082009-11-21 19:28:32 +000064 message="component: ${component}"/>
david_williamsef62fc42011-03-18 02:33:39 +000065
david_williams2171a5b2008-02-10 08:15:08 +000066 <echo
67 level="debug"
david_williamsab8b6082009-11-21 19:28:32 +000068 message="wtp.builder.home: ${wtp.builder.home}"/>
david_williamsef62fc42011-03-18 02:33:39 +000069 <!--
david_williamsffc9dc22010-05-01 18:53:48 +000070 tip from Andrew, in bug 309723
71 https://bugs.eclipse.org/bugs/show_bug.cgi?id=309723
72 Also, the property ${eclipse.pdebuild.scripts} is defined by pde.build and
73 points to the scripts directory of the running pde.build. Similarly,
74 ${eclipse.pdebuild.templates} points to the templates folder. You can use this
75 instead of the more error prone manual "pde.build.scripts"
david_williams7e568c72010-09-12 09:04:15 +000076 -->
david_williams30dc4fe2011-08-13 21:25:10 +000077 <echo
78 level="debug"
79 message="eclipse.pdebuild.scripts: ${eclipse.pdebuild.scripts}"/>
david_williamsef62fc42011-03-18 02:33:39 +000080
david_williams2171a5b2008-02-10 08:15:08 +000081 <ant
82 antfile="build.xml"
david_williamsffc9dc22010-05-01 18:53:48 +000083 dir="${eclipse.pdebuild.scripts}">
david_williams2171a5b2008-02-10 08:15:08 +000084 <property
85 name="builder"
david_williamsab8b6082009-11-21 19:28:32 +000086 value="${wtp.builder.home}/components/${component}"/>
david_williams2171a5b2008-02-10 08:15:08 +000087 <property
88 name="wtp.builder.home"
david_williamsab8b6082009-11-21 19:28:32 +000089 value="${wtp.builder.home}"/>
david_williams2171a5b2008-02-10 08:15:08 +000090 <property
91 name="buildBranch"
david_williamsab8b6082009-11-21 19:28:32 +000092 value="${buildBranch}"/>
david_williams2171a5b2008-02-10 08:15:08 +000093 <property
94 name="dependencyTargets"
david_williamsab8b6082009-11-21 19:28:32 +000095 value="${wtp.builder.home}/scripts/dependency/build.xml"/>
david_williamsef62fc42011-03-18 02:33:39 +000096
david_williams2171a5b2008-02-10 08:15:08 +000097 <property
98 name="baseLocation"
david_williamsab8b6082009-11-21 19:28:32 +000099 value="${env.PROJECT_PROJECTS}/${projectname}/eclipse"/>
david_williams2171a5b2008-02-10 08:15:08 +0000100 <property
101 name="buildRoot"
david_williamsab8b6082009-11-21 19:28:32 +0000102 value="${env.PROJECT_PROJECTS}/${projectname}"/>
david_williams2171a5b2008-02-10 08:15:08 +0000103 </ant>
104 </target>
david_williamsab8b6082009-11-21 19:28:32 +0000105
david_williams11f4fa32008-05-10 09:32:45 +0000106 <!-- check if PDE basebuilder and WTP builder is present -->
david_williams2171a5b2008-02-10 08:15:08 +0000107 <target
108 name="checkBaseBuilder"
david_williamsef62fc42011-03-18 02:33:39 +0000109 depends="init">
david_williamsab8b6082009-11-21 19:28:32 +0000110 <!--
111 we just check if both base, and our wtp specific one are
112 current, if either is not, we'll get them both
113 -->
david_williams94ffb372011-02-12 07:11:50 +0000114 <condition property="basebuilderlocal">
david_williamsef62fc42011-03-18 02:33:39 +0000115 <available file="${pde.builder.path}"/>
david_williams2171a5b2008-02-10 08:15:08 +0000116 </condition>
david_williamsef62fc42011-03-18 02:33:39 +0000117
david_williams2171a5b2008-02-10 08:15:08 +0000118 </target>
david_williamsab8b6082009-11-21 19:28:32 +0000119 <!--
120 1)init -> set buildBranch, and create label.properties
121 2)checkBaseBuilder -> check is baseBuilder exists, if not
122 retrieve from CVS org.eclipse.releg.basebuilder 3)invoke
123 getWTPBaseBuilder -> checks if
124 org.eclipse.wtp.releng.tools_version.jar exist, if not download
125 from WTP build site
126 -->
david_williams2171a5b2008-02-10 08:15:08 +0000127 <target
128 name="getBaseBuilder"
david_williamsef62fc42011-03-18 02:33:39 +0000129 depends="init,checkBaseBuilder,installedEclipseBuilder,installEclipseBuilder,touchBaseBuilder"
130 if="eclipse.builder.fetch"
david_williams2171a5b2008-02-10 08:15:08 +0000131 unless="basebuilderlocal">
david_williamsab8b6082009-11-21 19:28:32 +0000132
david_williamsef62fc42011-03-18 02:33:39 +0000133 <fail if="p2DirectorInstallFailed"/>
134
david_williams30dc4fe2011-08-13 21:25:10 +0000135 <echo
136 level="debug"
137 message="installed eclipse builder: ${pde.builder.path}"/>
david_williamsef62fc42011-03-18 02:33:39 +0000138
david_williams2171a5b2008-02-10 08:15:08 +0000139 </target>
david_williams94ffb372011-02-12 07:11:50 +0000140
david_williamsef62fc42011-03-18 02:33:39 +0000141 <target
142 name="installedEclipseBuilder"
143 depends="init,checkBaseBuilder"
144 if="basebuilderlocal">
145
david_williams30dc4fe2011-08-13 21:25:10 +0000146 <echo
147 level="debug"
148 message="found installed eclipse builder: ${pde.builder.path}"/>
david_williamsef62fc42011-03-18 02:33:39 +0000149
150 </target>
151
152 <target
153 name="installEclipseBuilder"
154 depends="init,checkBaseBuilder"
155 unless="basebuilderlocal">
156
157 <property
158 name="dependency.properties"
159 value="${env.PROJECT_BUILDERS}/${projectname}/${env.RELENG}/${dependencyFileLocation}"/>
160 <available
161 file="${dependency.properties}"
162 property="dependency.properties.exists"/>
163 <fail
164 message="dependency file not found: ${dependency.properties}"
165 unless="dependency.properties.exists"/>
166 <property file="${dependency.properties}"/>
167 <ant
168 antfile="${wtp.builder.home}/scripts/dependency/dependency.xml"
169 target="prereq.eclipsebuilder"/>
170
171 <ant
172 antfile="${wtp.builder.home}/scripts/dependency/dependency.xml"
Carl Anderson3cf43402012-08-15 12:27:17 -0400173 target="prereq.egit"/>
174
175 <ant
176 antfile="${wtp.builder.home}/scripts/dependency/dependency.xml"
177 target="prereq.gitfetchfactory"/>
178
179 <ant
180 antfile="${wtp.builder.home}/scripts/dependency/dependency.xml"
david_williamsef62fc42011-03-18 02:33:39 +0000181 target="prereq.wtpbuildtools"/>
182
183 <!-- remember, we install wtp tools only when eclipse builder is installed,
184 so we'll want to remove the eclipse builder at the very start of every main build,
185 to make sure all is fresh and current
186 <antcall target="getWTPBaseBuilder"/>-->
187
188 </target>
189 <!--
david_williams9e7f5842011-03-06 03:32:03 +0000190 touch base builder when used (but not fetched), so cleanup scripts that
191 look for "modified time" will know it is still being used. Modified times are sometimes
192 used instead of access times in scripts since even ls or find will change access times
193 -->
david_williams94ffb372011-02-12 07:11:50 +0000194 <target
195 name="touchBaseBuilder"
david_williamsef62fc42011-03-18 02:33:39 +0000196 depends="init"
david_williams94ffb372011-02-12 07:11:50 +0000197 if="basebuilderlocal">
david_williams9a108fb2011-02-12 07:30:52 +0000198 <touch>
david_williamsef62fc42011-03-18 02:33:39 +0000199 <fileset dir="${eclipse.builder.base.install.dir}"/>
david_williams2398e362011-03-05 02:45:39 +0000200 </touch>
david_williams94ffb372011-02-12 07:11:50 +0000201 </target>
david_williams9e7f5842011-03-06 03:32:03 +0000202
david_williamsab8b6082009-11-21 19:28:32 +0000203 <!--
204 check wtpBulderPresent property if false, download WTP builder
205 file org.eclipse.wtp.releng.tools_version.jar into baseBuiders
206 -->
david_williams2171a5b2008-02-10 08:15:08 +0000207 <target
208 name="getWTPBaseBuilder"
david_williamsef62fc42011-03-18 02:33:39 +0000209 depends="init">
210
211 <java
212 taskname="p2Director Install of wtp tools"
213 fork="true"
214 resultProperty="p2DirectorInstallResult"
215 failonerror="false"
216 timeout="1800000"
217 dir="${pde.builder.path}"
Carl Andersonf1859b72013-10-07 14:01:59 -0400218 jvm="${env.JAVA_7_HOME}/bin/java"
david_williamsef62fc42011-03-18 02:33:39 +0000219 classname="org.eclipse.equinox.launcher.Main">
220 <classpath>
221 <fileset dir="${pde.builder.path}/plugins">
222 <include name="org.eclipse.equinox.launcher_*.jar"/>
223 </fileset>
224 </classpath>
225 <jvmarg value="-Djava.io.tmpdir=${env.RECOMMENDED_TMP_DIR}"/>
226 <jvmarg value="-Dwtp.builder.home=${wtp.builder.home}"/>
227 <jvmarg value="-Dbuild.distribution=${build.distribution}"/>
228 <arg value="-nosplash"/>
229 <arg value="-debug"/>
230 <arg value="-consolelog"/>
231 <arg value="-data"/>
232 <arg value="${pde.builder.path}/wtptoolsp2DirectorInstall"/>
233 <jvmarg value="-Dosgi.instance.area=${pde.builder.path}/configuration"/>
234
235 <arg value="-application"/>
236 <arg value="org.eclipse.equinox.p2.director"/>
237 <arg value="-destination"/>
238 <arg value="${pde.builder.path}"/>
239
240 <arg value="-repository"/>
241 <arg value="${wtpBuildTools.repository}"/>
242 <arg value="-installIU"/>
243 <arg value="${wtpBuildTools.feature}"/>
244
245 <!-- make sure our forked env has a DISPLAY -->
246 <env
247 key="DISPLAY"
248 value="${env.DISPLAY}"/>
249 <redirector
250 output="${pde.builder.path}/fullOutputLogWTPp2Directory.txt"
251 error="${pde.builder.path}/fullErrorLogWTPp2Directory.txt"/>
252
253 </java>
254 <!-- If the task succeeds, this ouput log won't be that relevent ... (can be make better in future ... but for now we'll make a copy,
255 just in case we need it -->
david_williams30dc4fe2011-08-13 21:25:10 +0000256 <echo
257 level="debug"
258 message="p2DirectorInstallResult: ${p2DirectorInstallResult}"/>
david_williamsef62fc42011-03-18 02:33:39 +0000259
260 <condition property="p2DirectorInstallFailed">
261 <not>
262 <equals
263 arg1="0"
264 arg2="${p2DirectorInstallResult}"/>
265 </not>
david_williams2171a5b2008-02-10 08:15:08 +0000266 </condition>
david_williamsef62fc42011-03-18 02:33:39 +0000267
david_williams2171a5b2008-02-10 08:15:08 +0000268 </target>
david_williamsab8b6082009-11-21 19:28:32 +0000269
david_williamsef62fc42011-03-18 02:33:39 +0000270
david_williamsab8b6082009-11-21 19:28:32 +0000271 <!-- set buildBranch, and create label.properties-->
david_williamsef62fc42011-03-18 02:33:39 +0000272 <target
273 name="init"
274 unless="runBuildInitialized">
275 <!-- = = = standard properties pattern = = = -->
276 <!--
277 Note to be cross-platform, "environment variables" are only
278 appropriate for some variables, e.g. ones we set, since
279 properties are case sensitive, even if the environment variables
280 on your operating system are not, e.g. it will be ${env.Path}
281 not ${env.PATH} on Windows
282 -->
283 <property environment="env"/>
284 <!--
285 Let users override standard properties, if desired. If
286 directory, file, or some properties do not exist, then standard
287 properties will be used.
288 -->
289 <property file="${env.LOCAL_BUILD_PROPERTIES_DIR}/${ant.project.name}.properties"/>
290
291 <!-- = = = end standard properties pattern = = = -->
292 <fail
293 unless="env.BUILD_HOME"
294 message="all scripts need a BUILD_HOME"/>
295
david_williams2171a5b2008-02-10 08:15:08 +0000296 <property
david_williamsef62fc42011-03-18 02:33:39 +0000297 name="keyCfgFile"
298 value="${env.PROJECT_BUILDERS}/${projectname}/${env.RELENG}/maps/build.cfg"/>
299 <echo
300 level="debug"
301 message="keyCfgFile: ${keyCfgFile}"/>
302 <property file="${keyCfgFile}"/>
303 <fail
304 unless="builderVersion"
305 message="Could not get builderVersion. Probably could not checkout build.cfg?"/>
306
307 <echo
david_williams14cadd12011-03-23 06:43:39 +0000308 level="debug"
david_williamsef62fc42011-03-18 02:33:39 +0000309 message="buildDirectory: ${buildDirectory}"/>
310
311 <!--
312 We should not always normalize ("-repack") jars by default,
313 since in production we sign the jars (which does the -repack for
314 us) and not in production we don't really care so why spend the
315 extra time. For jars which are not supposed to be normalized,
316 such as pre-existing jars, they need to be added to the
317 pack.properties file (see the updatePackProperties task). Note:
318 signing does the -repack when we sign. This can be over-ridden
319 by the caller setting normalize to true, but there are know
320 known cases where we want to normalize (and eventually pack) the
321 jar files but not sign them.
322 -->
323 <property
324 name="normalizeJarFiles"
325 value="false"/>
326
david_williamsab8b6082009-11-21 19:28:32 +0000327 <!--
328 strip trailing blanks. Seems either Eclipse, or CVS make it
329 hard to not have trailing spaces
330 -->
david_williams2171a5b2008-02-10 08:15:08 +0000331 <replaceregexp
332 flags="gm"
333 file="${wtp.builder.home}/build.properties"
334 match=" *$"
david_williamsab8b6082009-11-21 19:28:32 +0000335 replace=""/>
david_williams94ffb372011-02-12 07:11:50 +0000336 <property file="${wtp.builder.home}/build.properties"/>
337 <ant antfile="${wtp.builder.home}/scripts/build/label.xml"/>
david_williamsef62fc42011-03-18 02:33:39 +0000338
david_williams94ffb372011-02-12 07:11:50 +0000339 <property file="${buildDirectory}/label.properties"/>
david_williamsef62fc42011-03-18 02:33:39 +0000340
david_williamsab8b6082009-11-21 19:28:32 +0000341 <!--
342 fetch the HEAD stream of all projects if build type
343 specified as N
344 -->
david_williams2171a5b2008-02-10 08:15:08 +0000345 <condition
346 property="fetchTag"
Carl Anderson3cf43402012-08-15 12:27:17 -0400347 value="CVS=HEAD,GIT=origin/master">
david_williams2171a5b2008-02-10 08:15:08 +0000348 <equals
349 arg1="${buildType}"
david_williamsab8b6082009-11-21 19:28:32 +0000350 arg2="N"/>
david_williams2171a5b2008-02-10 08:15:08 +0000351 </condition>
david_williamsab8b6082009-11-21 19:28:32 +0000352 <!--
353 exit if the component directory doesn't exist (for example,
354 may not always be an "sdk" component, but we often generate
355 calls to it)
356 -->
david_williams94ffb372011-02-12 07:11:50 +0000357 <condition property="doBuild">
david_williamsab8b6082009-11-21 19:28:32 +0000358 <available
359 file="${wtp.builder.home}/components/${component}"
360 type="dir"/>
361 </condition>
david_williamsef62fc42011-03-18 02:33:39 +0000362
363 <property
364 name="local.cache.dir"
365 value="${env.LOCAL_PREREQS_CACHE}"/>
366
367 <!-- this should only be set here ... the purpose is we install only once per build session -->
368 <property
369 name="runBuildInitialized"
370 value="true"/>
371
david_williams2171a5b2008-02-10 08:15:08 +0000372 </target>
373 <target
374 name="runEclipseBuild"
david_williamsef62fc42011-03-18 02:33:39 +0000375 depends="init"
david_williams2171a5b2008-02-10 08:15:08 +0000376 if="buildId">
david_williamsef62fc42011-03-18 02:33:39 +0000377
david_williamsab8b6082009-11-21 19:28:32 +0000378 <fail
379 message="dependency.properties must be specified by distribution script"
380 unless="dependency.properties"/>
381 <!--
382 if not otherwise set "externally", set the classpath jars
383 for the Execution Envirnonments we need in WTP. And other
384 parameters we need set. To successfully do local builds,
385 most of these do have to be provided externally, such as in
386 "localbuildproperties" directory
387 -->
david_williams2171a5b2008-02-10 08:15:08 +0000388 <property
389 name="J2SE-1.4"
david_williamsab8b6082009-11-21 19:28:32 +0000390 value="${env.JAVA_4_HOME}/jre/lib/core.jar:${env.JAVA_4_HOME}/jre/lib/xml.jar:${env.JAVA_4_HOME}/jre/lib/graphics.jar:${env.JAVA_4_HOME}/jre/lib/server.jar:${env.JAVA_4_HOME}/jre/lib/ibmorbapi.jar:${env.JAVA_4_HOME}/jre/lib/security.jar:${env.JAVA_4_HOME}/jre/lib/ibmpkcs.jar:${env.JAVA_4_HOME}/jre/lib/ibmjcefw.jar"/>
david_williams2171a5b2008-02-10 08:15:08 +0000391 <property
392 name="J2SE-1.5"
david_williams968300b2010-10-19 05:19:55 +0000393 value="${env.JAVA_5_HOME}/jre/lib/core.jar:${env.JAVA_5_HOME}/jre/lib/vm.jar:${env.JAVA_5_HOME}/jre/lib/xml.jar:${env.JAVA_5_HOME}/jre/lib/graphics.jar:${env.JAVA_5_HOME}/jre/lib/server.jar:${env.JAVA_5_HOME}/jre/lib/ibmorbapi.jar:${env.JAVA_5_HOME}/jre/lib/security.jar:${env.JAVA_5_HOME}/jre/lib/ibmpkcs.jar:${env.JAVA_5_HOME}/jre/lib/ibmjcefw.jar"/>
david_williams7cad5822008-09-20 02:46:54 +0000394 <property
david_williamse2d15192008-09-22 04:54:32 +0000395 name="JavaSE-1.6"
tle0433ce62011-02-03 21:59:29 +0000396 value="${env.JAVA_6_HOME}/jre/lib/rt.jar:${env.JAVA_6_HOME}/jre/lib/vm.jar:${env.JAVA_6_HOME}/jre/lib/java.util.jar:${env.JAVA_6_HOME}/jre/lib/xml.jar:${env.JAVA_6_HOME}/jre/lib/ibmorbapi.jar:${env.JAVA_6_HOME}/jre/lib/security.jar:${env.JAVA_6_HOME}/jre/lib/ibmpkcs.jar:${env.JAVA_6_HOME}/jre/lib/ibmjcefw.jar:${env.JAVA_6_HOME}/jre/lib/beans.jar:${env.JAVA_6_HOME}/jre/lib/logging.jar"/>
Carl Andersonf1859b72013-10-07 14:01:59 -0400397 <property
398 name="JavaSE-1.7"
399 value="${env.JAVA_7_HOME}/jre/lib/rt.jar:${env.JAVA_7_HOME}/jre/lib/vm.jar:${env.JAVA_7_HOME}/jre/lib/java.util.jar:${env.JAVA_7_HOME}/jre/lib/xml.jar:${env.JAVA_7_HOME}/jre/lib/ibmorbapi.jar:${env.JAVA_7_HOME}/jre/lib/security.jar:${env.JAVA_7_HOME}/jre/lib/ibmpkcs.jar:${env.JAVA_7_HOME}/jre/lib/ibmjcefw.jar:${env.JAVA_7_HOME}/jre/lib/beans.jar:${env.JAVA_7_HOME}/jre/lib/logging.jar"/>
400
401 <!--
david_williamsebe9e5d2011-07-02 02:37:52 +0000402 local builds should set build.donottagmaps to true, in
403 runbuild.properties, to avoid erroneous time stamps, though also requires "cvs write user" to be set to valid committer id, etc.
david_williamsab8b6082009-11-21 19:28:32 +0000404 -->
david_williams2171a5b2008-02-10 08:15:08 +0000405 <property
david_williams7d822c82008-02-24 04:27:41 +0000406 name="build.donottagmaps"
david_williamsab8b6082009-11-21 19:28:32 +0000407 value="false"/>
Carl Andersonf1859b72013-10-07 14:01:59 -0400408 <fail
409 unless="JavaSE-1.7"
410 message="classpath to JavaSE-1.7 Execution Environment must be set"/>
411 <fail
david_williamse2d15192008-09-22 04:54:32 +0000412 unless="JavaSE-1.6"
david_williamsab8b6082009-11-21 19:28:32 +0000413 message="classpath to JavaSE-1.6 Execution Environment must be set"/>
david_williams2171a5b2008-02-10 08:15:08 +0000414 <fail
415 unless="J2SE-1.5"
david_williamsab8b6082009-11-21 19:28:32 +0000416 message="classpath to J2SE-1.5 Execution Environment must be set"/>
david_williams2171a5b2008-02-10 08:15:08 +0000417 <fail
418 unless="J2SE-1.4"
david_williamsab8b6082009-11-21 19:28:32 +0000419 message="classpath to J2SE-1.4 Execution Environment must be set"/>
420 <!--
421 we read these in as ant properties, so in java call below,
422 we convert them to system (environment) properties, which is
423 where PDE expects to find them
424 -->
david_williams30dc4fe2011-08-13 21:25:10 +0000425 <!--
426 Note: echoing the class path values was changed from 'debug' to 'info' so the value would become part of the log.
427 This is a good practice especially since we started using symbolic links under the covers to point to insalled VMs,
428 so echoing their value to the log will provide an permentant recored of exactly which version of libraries were
david_williams19819fe2011-08-13 21:41:07 +0000429 used during compilation. Hard to find, and unlikely to ever be needed ... but, it will be there, just in case it is.
430
431 Correction: it did not fully resolve the names, before printing out. (Unlike "sun.boot.classpath" environment varialbe.
432 Guess someone can figure out how to add some special ant statements to fully resole, and print it out,
433 if anyone ever cares. Or, find a better way. But, should never need to know, so not worth much effort, if any.
434
david_williams30dc4fe2011-08-13 21:25:10 +0000435 -->
436
437 <echo
438 level="info"
439 message="JavaSE-1.6=${JavaSE-1.6}"/>
440 <echo
441 level="info"
442 message="J2SE-1.5=${J2SE-1.5}"/>
443 <echo
444 level="info"
445 message="J2SE-1.4=${J2SE-1.4}"/>
david_williamsef62fc42011-03-18 02:33:39 +0000446 <!--
david_williams94ffb372011-02-12 07:11:50 +0000447 <mkdir dir="${buildDirectory}/${buildLabel}"/>
448 <mkdir dir="${buildDirectory}/${buildLabel}/buildworkspaces"/>
david_williamsef62fc42011-03-18 02:33:39 +0000449 -->
450 <!--
david_williamsa7324e42011-03-06 00:00:01 +0000451 TODO: should we capture exit code in resultproperty (javaEclipseBuildResult)
452 and (eventually) take some 'fail' action ... after saving logs, etc.? ...
453 but where?
454 -->
david_williamsba00a342011-03-12 05:11:19 +0000455 <condition
456 property="antQuietValue"
457 value="-quiet"
458 else="">
459 <istrue value="${env.USE_QUIET}"/>
460 </condition>
david_williams2171a5b2008-02-10 08:15:08 +0000461 <java
462 taskname="build-${build.distribution}-${component}"
david_williamsef62fc42011-03-18 02:33:39 +0000463 classname="org.eclipse.equinox.launcher.Main"
david_williams9e7f5842011-03-06 03:32:03 +0000464 fork="true"
david_williamsa7324e42011-03-06 00:00:01 +0000465 failonerror="false"
466 resultproperty="javaResult">
david_williamsef62fc42011-03-18 02:33:39 +0000467 <classpath>
468 <fileset dir="${pde.builder.path}/plugins">
469 <include name="org.eclipse.equinox.launcher_*.jar"/>
470 </fileset>
471 </classpath>
david_williams94ffb372011-02-12 07:11:50 +0000472 <jvmarg value="-Dosgi.ws=${env.BASEWS}"/>
473 <jvmarg value="-Dosgi.os=${env.BASEOS}"/>
474 <jvmarg value="-Dosgi.arch=${env.BASEARCH}"/>
475 <jvmarg value="-Dbuild.home=${env.BUILD_HOME}"/>
Carl Andersonf1859b72013-10-07 14:01:59 -0400476 <jvmarg value="-DJAVA_7_HOME=${env.JAVA_7_HOME}"/>
477 <jvmarg value="-DJAVA_6_HOME=${env.JAVA_6_HOME}"/>
david_williams94ffb372011-02-12 07:11:50 +0000478 <jvmarg value="-DJAVA_5_HOME=${env.JAVA_5_HOME}"/>
479 <jvmarg value="-DJAVA_4_HOME=${env.JAVA_4_HOME}"/>
Carl Andersonf1859b72013-10-07 14:01:59 -0400480 <jvmarg value="-DJavaSE-1.7=${JavaSE-1.7}"/>
481 <jvmarg value="-DJavaSE-1.6=${JavaSE-1.6}"/>
482 <jvmarg value="-DJ2SE-1.5=${J2SE-1.5}"/>
david_williams94ffb372011-02-12 07:11:50 +0000483 <jvmarg value="-DJ2SE-1.4=${J2SE-1.4}"/>
484 <jvmarg value="-Dbuild.donottagmaps=${build.donottagmaps}"/>
485 <jvmarg value="-DbuildType=${buildType}"/>
486 <jvmarg value="-DdependencyFileLocation=${dependencyFileLocation}"/>
david_williamsbf62a202010-09-27 05:03:32 +0000487
david_williams94ffb372011-02-12 07:11:50 +0000488 <jvmarg value="-DbuildId=${buildId}"/>
489 <jvmarg value="-DmapVersionTag=${mapVersionTag}"/>
david_williamsef62fc42011-03-18 02:33:39 +0000490
david_williams94ffb372011-02-12 07:11:50 +0000491 <jvmarg value="-Dprojectname=${projectname}"/>
492 <jvmarg value="-DbuildLabel=${buildLabel}"/>
493 <jvmarg value="-Dreleng.jsf-mapVersionTag=${releng.jsf-mapVersionTag}"/>
494 <jvmarg value="-Dreleng.dali-mapVersionTag=${releng.dali-mapVersionTag}"/>
495 <jvmarg value="-Dreleng.jsdt-mapVersionTag=${releng.jsdt-mapVersionTag}"/>
496 <jvmarg value="-Dwtp.builder.home=${wtp.builder.home}"/>
497 <jvmarg value="-Dbuild.distribution=${build.distribution}"/>
498 <jvmarg value="-Dcomponent=${component}"/>
499 <jvmarg value="-Ddependency.properties=${dependency.properties}"/>
500 <jvmarg value="-DwtpBuildTools.file=${wtpBuildTools.file}"/>
501 <jvmarg value="-Djava.io.tmpdir=${env.RECOMMENDED_TMP_DIR}"/>
502 <jvmarg value="-DSKIP_JAR_SIGNING=${SKIP_JAR_SIGNING}"/>
503 <jvmarg value="-DnormalizeJarFiles=${normalizeJarFiles}"/>
504 <jvmarg value="-Dosgi.instance.area=${buildDirectory}/${buildLabel}/buildworkspaces/workspace-runbuild-${component}"/>
505 <arg value="-application"/>
506 <arg value="org.eclipse.ant.core.antRunner"/>
david_williamsba00a342011-03-12 05:11:19 +0000507 <arg value="${antQuietValue}"/>
david_williams94ffb372011-02-12 07:11:50 +0000508 <arg value="-buildfile"/>
509 <arg value="${ant.file}"/>
510 <arg value="build"/>
david_williams2171a5b2008-02-10 08:15:08 +0000511 </java>
david_williamsa7324e42011-03-06 00:00:01 +0000512
david_williams2171a5b2008-02-10 08:15:08 +0000513 </target>
514</project>