blob: 21ebabe03132674648118cf357009c7a6db310aa [file] [log] [blame]
david_williams42f9b242006-11-27 18:45:14 +00001<?xml version="1.0" encoding="UTF-8"?>
2<project name="runbuild" default="runbuild" basedir=".">
3
4 <!-- = = = standard properties pattern = = = -->
5 <!--
6 Note to be cross-platform, "environment variables" are only appropriate for
7 some variables, e.g. ones we set, since properties are case sensitive, even if
8 the environment variables on your operating system are not, e.g. it will
9 be ${env.Path} not ${env.PATH} on Windows -->
10 <property environment="env" />
11
12 <!--
13 Let users override standard properties, if desired.
14 If directory, file, or some properties do not exist,
15 then standard properties will be used.
16 -->
17 <property file="${env.LOCAL_BUILD_PROPERTIES_DIR}/${ant.project.name}.properties" />
18
19 <!-- load standard properties for production environment -->
20 <property file="${env.STANDARD_PROPERTIES_DIR}/${ant.project.name}.properties" />
21 <!-- = = = end standard properties pattern = = = -->
22
david_williamsce156292006-12-11 00:12:35 +000023
24
25 <!-- if not explicitly set by caller, we'll assume we should fail
26 here on errors. In some cases, such as JUnit test compiles, or
27 even leaf components, the caller may want to set to false, so that
28 some part of the build is still made available -->
david_williamsc1a06b12006-12-11 00:12:36 +000029 <property name="eclipseBuildFailOnError" value="true" />
david_williamsce156292006-12-11 00:12:35 +000030
david_williams42f9b242006-11-27 18:45:14 +000031
32 <target name="runbuild">
33 <dirname file="${ant.file}"
34 property="scripts.build.dir" />
35 <property name="wtp.builder.home"
36 value="${scripts.build.dir}/../.." />
37
38 <antcall target="runEclipseBuild">
39 <param name="wtp.builder.home"
40 value="${wtp.builder.home}" />
41 </antcall>
42 <antcall target="runEclipseBuildStamped">
43 <param name="wtp.builder.home"
44 value="${wtp.builder.home}" />
45 </antcall>
46 </target>
47
48
49
50 <target name="build" depends="init">
51
52 <!--this property required as of Eclipse 3.0 stream builds > 20031126 -->
53 <property name="buildingOSGi" value="true" />
54
55 <!-- this generateFeatureVersionSuffix property causes feature
56 suffixes to be calcuated based on their
57 own CVS tag, plus the qualifier of their contained plugins -->
58 <!--
59 https://bugs.eclipse.org/bugs/show_bug.cgi?id=138825
60 false for builds intended for 3.1.2, since can generate underscores
61 true for builds instended for 3.2
62 -->
63 <property name="generateFeatureVersionSuffix"
64 value="true" />
65
66 <property name="outputUpdateJars" value="true" />
67
68 <!--run the build for the specified component-->
69 <echo message="basedir: ${basedir}" />
david_williamsf1fa0422006-11-28 22:36:04 +000070 <echo message="component: ${component}" />
david_williams42f9b242006-11-27 18:45:14 +000071 <echo message="buildDirectory: ${buildDirectory}" />
72 <echo message="wtp.builder.home: ${wtp.builder.home}" />
73
74 <ant antfile="build.xml" dir="${pde.build.scripts}">
david_williams5c904dd2006-11-28 23:16:33 +000075 <property name="builder"
76 value="${wtp.builder.home}/components/${component}" />
david_williams42f9b242006-11-27 18:45:14 +000077 <property name="wtp.builder.home"
78 value="${wtp.builder.home}" />
79 <property name="buildBranch"
80 value="${buildBranch}" />
81 <property name="cvsUser" value="${cvsUser}" />
82 <property name="cvsProtocol"
83 value="${cvsProtocol}" />
84 <property name="dependencyTargets"
85 value="${wtp.builder.home}/scripts/dependency/build.xml" />
86 <property name="local.cache.dir"
87 value="${env.LOCAL_PREREQS_CACHE}" />
88 <property name="baseLocation"
89 value="${env.BUILD_HOME}/${build.current}-${build.distribution}-${buildBranch}-${buildType}/${base.location}" />
90 <property name="buildBranch"
91 value="${buildBranch}" />
92 <property name="build.pack-all-in-one"
93 value="${build.pack-all-in-one}" />
94 <property name="buildRoot"
95 value="${env.BUILD_HOME}/${build.current}-${build.distribution}-${buildBranch}-${buildType}" />
96 <property name="testRoot"
97 value="${env.BUILD_HOME}/${build.tests}-${build.distribution}-${buildBranch}-${buildType}" />
98 <property name="performanceRoot"
99 value="${env.BUILD_HOME}/${build.perf.tests}-${buildType}" />
100 </ant>
101 </target>
102
103 <target name="checkBaseBuilder">
104 <available property="basebuilderLocal"
105 file="${pde.builder.path}" />
106 </target>
107
108 <target name="getBaseBuilder"
109 depends="checkBaseBuilder"
110 unless="basebuilderLocal">
111 <!-- *** change the repo info -->
112 <property name="builderCvsRoot"
113 value=":pserver:anonymous@dev.eclipse.org:/cvsroot/eclipse" />
114 <!-- note: the HEAD version of base builder is not good to use.
115 in some cases, won't run at all, in the best of cases, will simply
116 be unstable, as its the development version -->
117 <property name="eclipse.builder.version"
118 value="r311_vM20050914-1235" />
119 <mkdir dir="${env.BUILD_HOME}/builders/${eclipse.builder.version}" />
120 <cvs cvsRoot="${builderCvsRoot}"
121 package="org.eclipse.releng.basebuilder"
122 dest="${env.BUILD_HOME}/builders/${eclipse.builder.version}"
123 tag="${eclipse.builder.version}" />
124 </target>
125
126
127 <target name="init">
128
129
130 <condition property="buildBranch" value="R2.0">
131 <equals arg1="${mapVersionTag}" arg2="HEAD" />
132 </condition>
133 <condition property="buildBranch" value="R0.7">
134 <equals arg1="${mapVersionTag}"
135 arg2="R0_7_maintenance" />
136 </condition>
137 <condition property="buildBranch" value="R1.0">
138 <equals arg1="${mapVersionTag}"
139 arg2="R1_0_maintenance" />
140 </condition>
141 <condition property="buildBranch" value="R1.5">
142 <equals arg1="${mapVersionTag}"
143 arg2="R1_5_maintenance" />
144 </condition>
145
146
147 <property file="${wtp.builder.home}/build.properties" />
148 <touch file="${user.home}/.cvspass" />
149
150 <ant antfile="${wtp.builder.home}/scripts/build/label.xml" />
151 <property file="${buildDirectory}/label.properties" />
152
153 <!--fetch the HEAD stream of all projects if build type specified as N-->
154 <condition property="fetchTag" value="HEAD">
155 <equals arg1="${buildType}" arg2="N" />
156 </condition>
157
158 <condition property="tagMaps">
159 <equals arg1="${build.trial}" arg2="false" />
160 </condition>
161 </target>
162
163 <target name="runEclipseBuild" if="buildId">
david_williamsf1fa0422006-11-28 22:36:04 +0000164 <java taskname="build-${build.distribution}-${component}"
david_williams42f9b242006-11-27 18:45:14 +0000165 classpath="${pde.builder.path}/startup.jar"
166 fork="true"
167 classname="org.eclipse.core.launcher.Main"
david_williamsc1a06b12006-12-11 00:12:36 +0000168 failonerror="${eclipseBuildFailOnError}">
david_williams42f9b242006-11-27 18:45:14 +0000169 <jvmarg value="-Dosgi.ws=${env.BASEWS}" />
170 <jvmarg value="-Dosgi.os=${env.BASEOS}" />
171 <jvmarg value="-Dosgi.arch=${env.BASEARCH}" />
172 <jvmarg value="-Dbuild.home=${env.BUILD_HOME}" />
173 <jvmarg value="-Dbuild.trial=${build.trial}" />
174 <jvmarg value="-DbuildType=${buildType}" />
175 <jvmarg value="-DbuildId=${buildId}" />
176 <jvmarg value="-DjavacDebugInfo=${javacDebugInfo}" />
177 <jvmarg value="-DmapVersionTag=${mapVersionTag}" />
178 <jvmarg value="-DcvsUser=${cvsUser}" />
179 <jvmarg value="-DcvsProtocol=${cvsProtocol}" />
180 <jvmarg value="-Dwtp.builder.home=${wtp.builder.home}" />
181 <jvmarg value="-Dbuild.distribution=${build.distribution}" />
david_williamsf1fa0422006-11-28 22:36:04 +0000182 <jvmarg value="-Dcomponent=${component}" />
david_williams42f9b242006-11-27 18:45:14 +0000183 <jvmarg value="-DJ2SE-1.5=${env.J2SE15}" />
184 <jvmarg value="-DJ2SE-1.4=${env.J2SE14}" />
185 <arg value="-application" />
186 <arg value="org.eclipse.ant.core.antRunner" />
187 <arg value="-buildfile" />
188 <arg value="${ant.file}" />
189 <arg value="build" />
190 </java>
191 </target>
david_williamsce156292006-12-11 00:12:35 +0000192
david_williams42f9b242006-11-27 18:45:14 +0000193 <target name="runEclipseBuildStamped" unless="buildId">
david_williamsf1fa0422006-11-28 22:36:04 +0000194 <java taskname="build-${build.distribution}-${component}"
david_williams42f9b242006-11-27 18:45:14 +0000195 classpath="${pde.builder.path}/startup.jar"
196 fork="true"
197 classname="org.eclipse.core.launcher.Main"
david_williamsc1a06b12006-12-11 00:12:36 +0000198 failonerror="${eclipseBuildFailOnError}">
david_williams42f9b242006-11-27 18:45:14 +0000199 <jvmarg value="-Dosgi.ws=${env.BASEWS}" />
200 <jvmarg value="-Dosgi.os=${env.BASEOS}" />
201 <jvmarg value="-Dosgi.arch=${env.BASEARCH}" />
202 <jvmarg value="-Dbuild.home=${env.BUILD_HOME}" />
203 <jvmarg value="-Dbuild.trial=${build.trial}" />
204 <jvmarg value="-DbuildType=${buildType}" />
205 <jvmarg value="-DjavacDebugInfo=${javacDebugInfo}" />
206 <jvmarg value="-DmapVersionTag=${mapVersionTag}" />
207 <jvmarg value="-DcvsUser=${cvsUser}" />
208 <jvmarg value="-DcvsProtocol=${cvsProtocol}" />
209 <jvmarg value="-Dwtp.builder.home=${wtp.builder.home}" />
210 <jvmarg value="-Dbuild.distribution=${build.distribution}" />
david_williamsf1fa0422006-11-28 22:36:04 +0000211 <jvmarg value="-Dcomponent=${component}" />
david_williams42f9b242006-11-27 18:45:14 +0000212 <jvmarg value="-DJ2SE-1.5=${env.J2SE15}" />
213 <jvmarg value="-DJ2SE-1.4=${env.J2SE14}" />
214 <arg value="-application" />
215 <arg value="org.eclipse.ant.core.antRunner" />
216 <arg value="-buildfile" />
217 <arg value="${ant.file}" />
218 <arg value="build" />
219 </java>
220 </target>
221</project>