david_williams | 42f9b24 | 2006-11-27 18:45:14 +0000 | [diff] [blame] | 1 | <?xml version="1.0" encoding="UTF-8"?> |
david_williams | 2171a5b | 2008-02-10 08:15:08 +0000 | [diff] [blame] | 2 | <project |
| 3 | name="runbuild" |
| 4 | default="runbuild" |
| 5 | basedir="."> |
david_williams | 42f9b24 | 2006-11-27 18:45:14 +0000 | [diff] [blame] | 6 | |
david_williams | ab8b608 | 2009-11-21 19:28:32 +0000 | [diff] [blame] | 7 | |
| 8 | <!-- main --> |
david_williams | ef62fc4 | 2011-03-18 02:33:39 +0000 | [diff] [blame] | 9 | <target |
| 10 | name="runbuild" |
| 11 | depends="init"> |
david_williams | 2171a5b | 2008-02-10 08:15:08 +0000 | [diff] [blame] | 12 | <dirname |
| 13 | file="${ant.file}" |
david_williams | ab8b608 | 2009-11-21 19:28:32 +0000 | [diff] [blame] | 14 | property="scripts.build.dir"/> |
david_williams | 2171a5b | 2008-02-10 08:15:08 +0000 | [diff] [blame] | 15 | <property |
| 16 | name="wtp.builder.home" |
david_williams | ab8b608 | 2009-11-21 19:28:32 +0000 | [diff] [blame] | 17 | value="${scripts.build.dir}/../../.."/> |
david_williams | 1e71b28 | 2008-03-10 10:12:40 +0000 | [diff] [blame] | 18 | |
david_williams | a7324e4 | 2011-03-06 00:00:01 +0000 | [diff] [blame] | 19 | <!-- invoke runEclipseBuild to invokde antBuidler (just in case we |
| 20 | are not in ant builder, already) --> |
david_williams | ef62fc4 | 2011-03-18 02:33:39 +0000 | [diff] [blame] | 21 | <antcall target="runEclipseBuild"/> |
david_williams | a7324e4 | 2011-03-06 00:00:01 +0000 | [diff] [blame] | 22 | |
| 23 | <!-- fast fail, if serious problem indicated in output logs --> |
| 24 | <ant antfile="${wtp.builder.home}/scripts/build/checkForFastFail.xml"/> |
| 25 | |
david_williams | 2171a5b | 2008-02-10 08:15:08 +0000 | [diff] [blame] | 26 | </target> |
| 27 | <target |
| 28 | name="build" |
david_williams | b0d8e73 | 2009-05-20 05:40:43 +0000 | [diff] [blame] | 29 | depends="init" |
david_williams | ab8b608 | 2009-11-21 19:28:32 +0000 | [diff] [blame] | 30 | if="doBuild"> |
| 31 | <!-- |
| 32 | this property required as of Eclipse 3.0 stream builds > |
| 33 | 20031126 |
| 34 | --> |
david_williams | 2171a5b | 2008-02-10 08:15:08 +0000 | [diff] [blame] | 35 | <property |
| 36 | name="buildingOSGi" |
david_williams | ab8b608 | 2009-11-21 19:28:32 +0000 | [diff] [blame] | 37 | 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_williams | 42f9b24 | 2006-11-27 18:45:14 +0000 | [diff] [blame] | 47 | --> |
david_williams | 2171a5b | 2008-02-10 08:15:08 +0000 | [diff] [blame] | 48 | <property |
| 49 | name="generateFeatureVersionSuffix" |
david_williams | ab8b608 | 2009-11-21 19:28:32 +0000 | [diff] [blame] | 50 | value="true"/> |
david_williams | 2171a5b | 2008-02-10 08:15:08 +0000 | [diff] [blame] | 51 | <property |
| 52 | name="outputUpdateJars" |
david_williams | ab8b608 | 2009-11-21 19:28:32 +0000 | [diff] [blame] | 53 | value="true"/> |
david_williams | 2171a5b | 2008-02-10 08:15:08 +0000 | [diff] [blame] | 54 | <property |
| 55 | name="runPackager" |
david_williams | ab8b608 | 2009-11-21 19:28:32 +0000 | [diff] [blame] | 56 | value="true"/> |
david_williams | 52d0fc0 | 2007-05-06 06:08:38 +0000 | [diff] [blame] | 57 | |
david_williams | ab8b608 | 2009-11-21 19:28:32 +0000 | [diff] [blame] | 58 | <!--run the build for the specified component--> |
david_williams | 2171a5b | 2008-02-10 08:15:08 +0000 | [diff] [blame] | 59 | <echo |
| 60 | level="debug" |
david_williams | ab8b608 | 2009-11-21 19:28:32 +0000 | [diff] [blame] | 61 | message="basedir: ${basedir}"/> |
david_williams | 2171a5b | 2008-02-10 08:15:08 +0000 | [diff] [blame] | 62 | <echo |
| 63 | level="debug" |
david_williams | ab8b608 | 2009-11-21 19:28:32 +0000 | [diff] [blame] | 64 | message="component: ${component}"/> |
david_williams | ef62fc4 | 2011-03-18 02:33:39 +0000 | [diff] [blame] | 65 | |
david_williams | 2171a5b | 2008-02-10 08:15:08 +0000 | [diff] [blame] | 66 | <echo |
| 67 | level="debug" |
david_williams | ab8b608 | 2009-11-21 19:28:32 +0000 | [diff] [blame] | 68 | message="wtp.builder.home: ${wtp.builder.home}"/> |
david_williams | ef62fc4 | 2011-03-18 02:33:39 +0000 | [diff] [blame] | 69 | <!-- |
david_williams | ffc9dc2 | 2010-05-01 18:53:48 +0000 | [diff] [blame] | 70 | 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_williams | 7e568c7 | 2010-09-12 09:04:15 +0000 | [diff] [blame] | 76 | --> |
david_williams | 14cadd1 | 2011-03-23 06:43:39 +0000 | [diff] [blame] | 77 | <echo level="debug" message="eclipse.pdebuild.scripts: ${eclipse.pdebuild.scripts}"/> |
david_williams | ef62fc4 | 2011-03-18 02:33:39 +0000 | [diff] [blame] | 78 | |
david_williams | 2171a5b | 2008-02-10 08:15:08 +0000 | [diff] [blame] | 79 | <ant |
| 80 | antfile="build.xml" |
david_williams | ffc9dc2 | 2010-05-01 18:53:48 +0000 | [diff] [blame] | 81 | dir="${eclipse.pdebuild.scripts}"> |
david_williams | 2171a5b | 2008-02-10 08:15:08 +0000 | [diff] [blame] | 82 | <property |
| 83 | name="builder" |
david_williams | ab8b608 | 2009-11-21 19:28:32 +0000 | [diff] [blame] | 84 | value="${wtp.builder.home}/components/${component}"/> |
david_williams | 2171a5b | 2008-02-10 08:15:08 +0000 | [diff] [blame] | 85 | <property |
| 86 | name="wtp.builder.home" |
david_williams | ab8b608 | 2009-11-21 19:28:32 +0000 | [diff] [blame] | 87 | value="${wtp.builder.home}"/> |
david_williams | 2171a5b | 2008-02-10 08:15:08 +0000 | [diff] [blame] | 88 | <property |
| 89 | name="buildBranch" |
david_williams | ab8b608 | 2009-11-21 19:28:32 +0000 | [diff] [blame] | 90 | value="${buildBranch}"/> |
david_williams | 2171a5b | 2008-02-10 08:15:08 +0000 | [diff] [blame] | 91 | <property |
| 92 | name="dependencyTargets" |
david_williams | ab8b608 | 2009-11-21 19:28:32 +0000 | [diff] [blame] | 93 | value="${wtp.builder.home}/scripts/dependency/build.xml"/> |
david_williams | ef62fc4 | 2011-03-18 02:33:39 +0000 | [diff] [blame] | 94 | |
david_williams | 2171a5b | 2008-02-10 08:15:08 +0000 | [diff] [blame] | 95 | <property |
| 96 | name="baseLocation" |
david_williams | ab8b608 | 2009-11-21 19:28:32 +0000 | [diff] [blame] | 97 | value="${env.PROJECT_PROJECTS}/${projectname}/eclipse"/> |
david_williams | 2171a5b | 2008-02-10 08:15:08 +0000 | [diff] [blame] | 98 | <property |
| 99 | name="buildRoot" |
david_williams | ab8b608 | 2009-11-21 19:28:32 +0000 | [diff] [blame] | 100 | value="${env.PROJECT_PROJECTS}/${projectname}"/> |
david_williams | 2171a5b | 2008-02-10 08:15:08 +0000 | [diff] [blame] | 101 | </ant> |
| 102 | </target> |
david_williams | ab8b608 | 2009-11-21 19:28:32 +0000 | [diff] [blame] | 103 | |
david_williams | 11f4fa3 | 2008-05-10 09:32:45 +0000 | [diff] [blame] | 104 | <!-- check if PDE basebuilder and WTP builder is present --> |
david_williams | 2171a5b | 2008-02-10 08:15:08 +0000 | [diff] [blame] | 105 | <target |
| 106 | name="checkBaseBuilder" |
david_williams | ef62fc4 | 2011-03-18 02:33:39 +0000 | [diff] [blame] | 107 | depends="init"> |
david_williams | ab8b608 | 2009-11-21 19:28:32 +0000 | [diff] [blame] | 108 | <!-- |
| 109 | we just check if both base, and our wtp specific one are |
| 110 | current, if either is not, we'll get them both |
| 111 | --> |
david_williams | 94ffb37 | 2011-02-12 07:11:50 +0000 | [diff] [blame] | 112 | <condition property="basebuilderlocal"> |
david_williams | ef62fc4 | 2011-03-18 02:33:39 +0000 | [diff] [blame] | 113 | <available file="${pde.builder.path}"/> |
david_williams | 2171a5b | 2008-02-10 08:15:08 +0000 | [diff] [blame] | 114 | </condition> |
david_williams | ef62fc4 | 2011-03-18 02:33:39 +0000 | [diff] [blame] | 115 | |
david_williams | 2171a5b | 2008-02-10 08:15:08 +0000 | [diff] [blame] | 116 | </target> |
david_williams | ab8b608 | 2009-11-21 19:28:32 +0000 | [diff] [blame] | 117 | <!-- |
| 118 | 1)init -> set buildBranch, and create label.properties |
| 119 | 2)checkBaseBuilder -> check is baseBuilder exists, if not |
| 120 | retrieve from CVS org.eclipse.releg.basebuilder 3)invoke |
| 121 | getWTPBaseBuilder -> checks if |
| 122 | org.eclipse.wtp.releng.tools_version.jar exist, if not download |
| 123 | from WTP build site |
| 124 | --> |
david_williams | 2171a5b | 2008-02-10 08:15:08 +0000 | [diff] [blame] | 125 | <target |
| 126 | name="getBaseBuilder" |
david_williams | ef62fc4 | 2011-03-18 02:33:39 +0000 | [diff] [blame] | 127 | depends="init,checkBaseBuilder,installedEclipseBuilder,installEclipseBuilder,touchBaseBuilder" |
| 128 | if="eclipse.builder.fetch" |
david_williams | 2171a5b | 2008-02-10 08:15:08 +0000 | [diff] [blame] | 129 | unless="basebuilderlocal"> |
david_williams | ab8b608 | 2009-11-21 19:28:32 +0000 | [diff] [blame] | 130 | |
david_williams | ef62fc4 | 2011-03-18 02:33:39 +0000 | [diff] [blame] | 131 | <fail if="p2DirectorInstallFailed"/> |
| 132 | |
david_williams | 14cadd1 | 2011-03-23 06:43:39 +0000 | [diff] [blame] | 133 | <echo level="debug" message="installed eclipse builder: ${pde.builder.path}"/> |
david_williams | ef62fc4 | 2011-03-18 02:33:39 +0000 | [diff] [blame] | 134 | |
david_williams | 2171a5b | 2008-02-10 08:15:08 +0000 | [diff] [blame] | 135 | </target> |
david_williams | 94ffb37 | 2011-02-12 07:11:50 +0000 | [diff] [blame] | 136 | |
david_williams | ef62fc4 | 2011-03-18 02:33:39 +0000 | [diff] [blame] | 137 | <target |
| 138 | name="installedEclipseBuilder" |
| 139 | depends="init,checkBaseBuilder" |
| 140 | if="basebuilderlocal"> |
| 141 | |
david_williams | 14cadd1 | 2011-03-23 06:43:39 +0000 | [diff] [blame] | 142 | <echo level="debug" message="found installed eclipse builder: ${pde.builder.path}"/> |
david_williams | ef62fc4 | 2011-03-18 02:33:39 +0000 | [diff] [blame] | 143 | |
| 144 | </target> |
| 145 | |
| 146 | <target |
| 147 | name="installEclipseBuilder" |
| 148 | depends="init,checkBaseBuilder" |
| 149 | unless="basebuilderlocal"> |
| 150 | |
| 151 | <property |
| 152 | name="dependency.properties" |
| 153 | value="${env.PROJECT_BUILDERS}/${projectname}/${env.RELENG}/${dependencyFileLocation}"/> |
| 154 | <available |
| 155 | file="${dependency.properties}" |
| 156 | property="dependency.properties.exists"/> |
| 157 | <fail |
| 158 | message="dependency file not found: ${dependency.properties}" |
| 159 | unless="dependency.properties.exists"/> |
| 160 | <property file="${dependency.properties}"/> |
| 161 | <ant |
| 162 | antfile="${wtp.builder.home}/scripts/dependency/dependency.xml" |
| 163 | target="prereq.eclipsebuilder"/> |
| 164 | |
| 165 | <ant |
| 166 | antfile="${wtp.builder.home}/scripts/dependency/dependency.xml" |
| 167 | target="prereq.wtpbuildtools"/> |
| 168 | |
| 169 | <!-- remember, we install wtp tools only when eclipse builder is installed, |
| 170 | so we'll want to remove the eclipse builder at the very start of every main build, |
| 171 | to make sure all is fresh and current |
| 172 | <antcall target="getWTPBaseBuilder"/>--> |
| 173 | |
| 174 | </target> |
| 175 | <!-- |
david_williams | 9e7f584 | 2011-03-06 03:32:03 +0000 | [diff] [blame] | 176 | touch base builder when used (but not fetched), so cleanup scripts that |
| 177 | look for "modified time" will know it is still being used. Modified times are sometimes |
| 178 | used instead of access times in scripts since even ls or find will change access times |
| 179 | --> |
david_williams | 94ffb37 | 2011-02-12 07:11:50 +0000 | [diff] [blame] | 180 | <target |
| 181 | name="touchBaseBuilder" |
david_williams | ef62fc4 | 2011-03-18 02:33:39 +0000 | [diff] [blame] | 182 | depends="init" |
david_williams | 94ffb37 | 2011-02-12 07:11:50 +0000 | [diff] [blame] | 183 | if="basebuilderlocal"> |
david_williams | 9a108fb | 2011-02-12 07:30:52 +0000 | [diff] [blame] | 184 | <touch> |
david_williams | ef62fc4 | 2011-03-18 02:33:39 +0000 | [diff] [blame] | 185 | <fileset dir="${eclipse.builder.base.install.dir}"/> |
david_williams | 2398e36 | 2011-03-05 02:45:39 +0000 | [diff] [blame] | 186 | </touch> |
david_williams | 94ffb37 | 2011-02-12 07:11:50 +0000 | [diff] [blame] | 187 | </target> |
david_williams | 9e7f584 | 2011-03-06 03:32:03 +0000 | [diff] [blame] | 188 | |
david_williams | ab8b608 | 2009-11-21 19:28:32 +0000 | [diff] [blame] | 189 | <!-- |
| 190 | check wtpBulderPresent property if false, download WTP builder |
| 191 | file org.eclipse.wtp.releng.tools_version.jar into baseBuiders |
| 192 | --> |
david_williams | 2171a5b | 2008-02-10 08:15:08 +0000 | [diff] [blame] | 193 | <target |
| 194 | name="getWTPBaseBuilder" |
david_williams | ef62fc4 | 2011-03-18 02:33:39 +0000 | [diff] [blame] | 195 | depends="init"> |
| 196 | |
| 197 | <java |
| 198 | taskname="p2Director Install of wtp tools" |
| 199 | fork="true" |
| 200 | resultProperty="p2DirectorInstallResult" |
| 201 | failonerror="false" |
| 202 | timeout="1800000" |
| 203 | dir="${pde.builder.path}" |
| 204 | jvm="${env.JAVA_6_HOME}/bin/java" |
| 205 | classname="org.eclipse.equinox.launcher.Main"> |
| 206 | <classpath> |
| 207 | <fileset dir="${pde.builder.path}/plugins"> |
| 208 | <include name="org.eclipse.equinox.launcher_*.jar"/> |
| 209 | </fileset> |
| 210 | </classpath> |
| 211 | <jvmarg value="-Djava.io.tmpdir=${env.RECOMMENDED_TMP_DIR}"/> |
| 212 | <jvmarg value="-Dwtp.builder.home=${wtp.builder.home}"/> |
| 213 | <jvmarg value="-Dbuild.distribution=${build.distribution}"/> |
| 214 | <arg value="-nosplash"/> |
| 215 | <arg value="-debug"/> |
| 216 | <arg value="-consolelog"/> |
| 217 | <arg value="-data"/> |
| 218 | <arg value="${pde.builder.path}/wtptoolsp2DirectorInstall"/> |
| 219 | <jvmarg value="-Dosgi.instance.area=${pde.builder.path}/configuration"/> |
| 220 | |
| 221 | <arg value="-application"/> |
| 222 | <arg value="org.eclipse.equinox.p2.director"/> |
| 223 | <arg value="-destination"/> |
| 224 | <arg value="${pde.builder.path}"/> |
| 225 | |
| 226 | <arg value="-repository"/> |
| 227 | <arg value="${wtpBuildTools.repository}"/> |
| 228 | <arg value="-installIU"/> |
| 229 | <arg value="${wtpBuildTools.feature}"/> |
| 230 | |
| 231 | <!-- make sure our forked env has a DISPLAY --> |
| 232 | <env |
| 233 | key="DISPLAY" |
| 234 | value="${env.DISPLAY}"/> |
| 235 | <redirector |
| 236 | output="${pde.builder.path}/fullOutputLogWTPp2Directory.txt" |
| 237 | error="${pde.builder.path}/fullErrorLogWTPp2Directory.txt"/> |
| 238 | |
| 239 | </java> |
| 240 | <!-- 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, |
| 241 | just in case we need it --> |
david_williams | 14cadd1 | 2011-03-23 06:43:39 +0000 | [diff] [blame] | 242 | <echo level="debug" message="p2DirectorInstallResult: ${p2DirectorInstallResult}"/> |
david_williams | ef62fc4 | 2011-03-18 02:33:39 +0000 | [diff] [blame] | 243 | |
| 244 | <condition property="p2DirectorInstallFailed"> |
| 245 | <not> |
| 246 | <equals |
| 247 | arg1="0" |
| 248 | arg2="${p2DirectorInstallResult}"/> |
| 249 | </not> |
david_williams | 2171a5b | 2008-02-10 08:15:08 +0000 | [diff] [blame] | 250 | </condition> |
david_williams | ef62fc4 | 2011-03-18 02:33:39 +0000 | [diff] [blame] | 251 | |
david_williams | 2171a5b | 2008-02-10 08:15:08 +0000 | [diff] [blame] | 252 | </target> |
david_williams | ab8b608 | 2009-11-21 19:28:32 +0000 | [diff] [blame] | 253 | |
david_williams | ef62fc4 | 2011-03-18 02:33:39 +0000 | [diff] [blame] | 254 | |
david_williams | ab8b608 | 2009-11-21 19:28:32 +0000 | [diff] [blame] | 255 | <!-- set buildBranch, and create label.properties--> |
david_williams | ef62fc4 | 2011-03-18 02:33:39 +0000 | [diff] [blame] | 256 | <target |
| 257 | name="init" |
| 258 | unless="runBuildInitialized"> |
| 259 | <!-- = = = standard properties pattern = = = --> |
| 260 | <!-- |
| 261 | Note to be cross-platform, "environment variables" are only |
| 262 | appropriate for some variables, e.g. ones we set, since |
| 263 | properties are case sensitive, even if the environment variables |
| 264 | on your operating system are not, e.g. it will be ${env.Path} |
| 265 | not ${env.PATH} on Windows |
| 266 | --> |
| 267 | <property environment="env"/> |
| 268 | <!-- |
| 269 | Let users override standard properties, if desired. If |
| 270 | directory, file, or some properties do not exist, then standard |
| 271 | properties will be used. |
| 272 | --> |
| 273 | <property file="${env.LOCAL_BUILD_PROPERTIES_DIR}/${ant.project.name}.properties"/> |
| 274 | |
| 275 | <!-- = = = end standard properties pattern = = = --> |
| 276 | <fail |
| 277 | unless="env.BUILD_HOME" |
| 278 | message="all scripts need a BUILD_HOME"/> |
| 279 | |
david_williams | 2171a5b | 2008-02-10 08:15:08 +0000 | [diff] [blame] | 280 | <property |
david_williams | ef62fc4 | 2011-03-18 02:33:39 +0000 | [diff] [blame] | 281 | name="keyCfgFile" |
| 282 | value="${env.PROJECT_BUILDERS}/${projectname}/${env.RELENG}/maps/build.cfg"/> |
| 283 | <echo |
| 284 | level="debug" |
| 285 | message="keyCfgFile: ${keyCfgFile}"/> |
| 286 | <property file="${keyCfgFile}"/> |
| 287 | <fail |
| 288 | unless="builderVersion" |
| 289 | message="Could not get builderVersion. Probably could not checkout build.cfg?"/> |
| 290 | |
| 291 | <echo |
david_williams | 14cadd1 | 2011-03-23 06:43:39 +0000 | [diff] [blame] | 292 | level="debug" |
david_williams | ef62fc4 | 2011-03-18 02:33:39 +0000 | [diff] [blame] | 293 | message="buildDirectory: ${buildDirectory}"/> |
| 294 | |
| 295 | <!-- |
| 296 | We should not always normalize ("-repack") jars by default, |
| 297 | since in production we sign the jars (which does the -repack for |
| 298 | us) and not in production we don't really care so why spend the |
| 299 | extra time. For jars which are not supposed to be normalized, |
| 300 | such as pre-existing jars, they need to be added to the |
| 301 | pack.properties file (see the updatePackProperties task). Note: |
| 302 | signing does the -repack when we sign. This can be over-ridden |
| 303 | by the caller setting normalize to true, but there are know |
| 304 | known cases where we want to normalize (and eventually pack) the |
| 305 | jar files but not sign them. |
| 306 | --> |
| 307 | <property |
| 308 | name="normalizeJarFiles" |
| 309 | value="false"/> |
| 310 | |
david_williams | ab8b608 | 2009-11-21 19:28:32 +0000 | [diff] [blame] | 311 | <!-- |
| 312 | strip trailing blanks. Seems either Eclipse, or CVS make it |
| 313 | hard to not have trailing spaces |
| 314 | --> |
david_williams | 2171a5b | 2008-02-10 08:15:08 +0000 | [diff] [blame] | 315 | <replaceregexp |
| 316 | flags="gm" |
| 317 | file="${wtp.builder.home}/build.properties" |
| 318 | match=" *$" |
david_williams | ab8b608 | 2009-11-21 19:28:32 +0000 | [diff] [blame] | 319 | replace=""/> |
david_williams | 94ffb37 | 2011-02-12 07:11:50 +0000 | [diff] [blame] | 320 | <property file="${wtp.builder.home}/build.properties"/> |
| 321 | <ant antfile="${wtp.builder.home}/scripts/build/label.xml"/> |
david_williams | ef62fc4 | 2011-03-18 02:33:39 +0000 | [diff] [blame] | 322 | |
david_williams | 94ffb37 | 2011-02-12 07:11:50 +0000 | [diff] [blame] | 323 | <property file="${buildDirectory}/label.properties"/> |
david_williams | ef62fc4 | 2011-03-18 02:33:39 +0000 | [diff] [blame] | 324 | |
david_williams | ab8b608 | 2009-11-21 19:28:32 +0000 | [diff] [blame] | 325 | <!-- |
| 326 | fetch the HEAD stream of all projects if build type |
| 327 | specified as N |
| 328 | --> |
david_williams | 2171a5b | 2008-02-10 08:15:08 +0000 | [diff] [blame] | 329 | <condition |
| 330 | property="fetchTag" |
| 331 | value="HEAD"> |
| 332 | <equals |
| 333 | arg1="${buildType}" |
david_williams | ab8b608 | 2009-11-21 19:28:32 +0000 | [diff] [blame] | 334 | arg2="N"/> |
david_williams | 2171a5b | 2008-02-10 08:15:08 +0000 | [diff] [blame] | 335 | </condition> |
david_williams | ab8b608 | 2009-11-21 19:28:32 +0000 | [diff] [blame] | 336 | <!-- |
| 337 | exit if the component directory doesn't exist (for example, |
| 338 | may not always be an "sdk" component, but we often generate |
| 339 | calls to it) |
| 340 | --> |
david_williams | 94ffb37 | 2011-02-12 07:11:50 +0000 | [diff] [blame] | 341 | <condition property="doBuild"> |
david_williams | ab8b608 | 2009-11-21 19:28:32 +0000 | [diff] [blame] | 342 | <available |
| 343 | file="${wtp.builder.home}/components/${component}" |
| 344 | type="dir"/> |
| 345 | </condition> |
david_williams | ef62fc4 | 2011-03-18 02:33:39 +0000 | [diff] [blame] | 346 | |
| 347 | <property |
| 348 | name="local.cache.dir" |
| 349 | value="${env.LOCAL_PREREQS_CACHE}"/> |
| 350 | |
| 351 | <!-- this should only be set here ... the purpose is we install only once per build session --> |
| 352 | <property |
| 353 | name="runBuildInitialized" |
| 354 | value="true"/> |
| 355 | |
david_williams | 2171a5b | 2008-02-10 08:15:08 +0000 | [diff] [blame] | 356 | </target> |
| 357 | <target |
| 358 | name="runEclipseBuild" |
david_williams | ef62fc4 | 2011-03-18 02:33:39 +0000 | [diff] [blame] | 359 | depends="init" |
david_williams | 2171a5b | 2008-02-10 08:15:08 +0000 | [diff] [blame] | 360 | if="buildId"> |
david_williams | ef62fc4 | 2011-03-18 02:33:39 +0000 | [diff] [blame] | 361 | |
david_williams | ab8b608 | 2009-11-21 19:28:32 +0000 | [diff] [blame] | 362 | <fail |
| 363 | message="dependency.properties must be specified by distribution script" |
| 364 | unless="dependency.properties"/> |
| 365 | <!-- |
| 366 | if not otherwise set "externally", set the classpath jars |
| 367 | for the Execution Envirnonments we need in WTP. And other |
| 368 | parameters we need set. To successfully do local builds, |
| 369 | most of these do have to be provided externally, such as in |
| 370 | "localbuildproperties" directory |
| 371 | --> |
david_williams | 2171a5b | 2008-02-10 08:15:08 +0000 | [diff] [blame] | 372 | <property |
| 373 | name="J2SE-1.4" |
david_williams | ab8b608 | 2009-11-21 19:28:32 +0000 | [diff] [blame] | 374 | 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_williams | 2171a5b | 2008-02-10 08:15:08 +0000 | [diff] [blame] | 375 | <property |
| 376 | name="J2SE-1.5" |
david_williams | 968300b | 2010-10-19 05:19:55 +0000 | [diff] [blame] | 377 | 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_williams | 7cad582 | 2008-09-20 02:46:54 +0000 | [diff] [blame] | 378 | <property |
david_williams | e2d1519 | 2008-09-22 04:54:32 +0000 | [diff] [blame] | 379 | name="JavaSE-1.6" |
tle | 0433ce6 | 2011-02-03 21:59:29 +0000 | [diff] [blame] | 380 | 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"/> |
david_williams | ab8b608 | 2009-11-21 19:28:32 +0000 | [diff] [blame] | 381 | <!-- |
david_williams | ebe9e5d | 2011-07-02 02:37:52 +0000 | [diff] [blame^] | 382 | local builds should set build.donottagmaps to true, in |
| 383 | runbuild.properties, to avoid erroneous time stamps, though also requires "cvs write user" to be set to valid committer id, etc. |
david_williams | ab8b608 | 2009-11-21 19:28:32 +0000 | [diff] [blame] | 384 | --> |
david_williams | 2171a5b | 2008-02-10 08:15:08 +0000 | [diff] [blame] | 385 | <property |
david_williams | 7d822c8 | 2008-02-24 04:27:41 +0000 | [diff] [blame] | 386 | name="build.donottagmaps" |
david_williams | ab8b608 | 2009-11-21 19:28:32 +0000 | [diff] [blame] | 387 | value="false"/> |
| 388 | <fail |
david_williams | e2d1519 | 2008-09-22 04:54:32 +0000 | [diff] [blame] | 389 | unless="JavaSE-1.6" |
david_williams | ab8b608 | 2009-11-21 19:28:32 +0000 | [diff] [blame] | 390 | message="classpath to JavaSE-1.6 Execution Environment must be set"/> |
david_williams | 2171a5b | 2008-02-10 08:15:08 +0000 | [diff] [blame] | 391 | <fail |
| 392 | unless="J2SE-1.5" |
david_williams | ab8b608 | 2009-11-21 19:28:32 +0000 | [diff] [blame] | 393 | message="classpath to J2SE-1.5 Execution Environment must be set"/> |
david_williams | 2171a5b | 2008-02-10 08:15:08 +0000 | [diff] [blame] | 394 | <fail |
| 395 | unless="J2SE-1.4" |
david_williams | ab8b608 | 2009-11-21 19:28:32 +0000 | [diff] [blame] | 396 | message="classpath to J2SE-1.4 Execution Environment must be set"/> |
| 397 | <!-- |
| 398 | we read these in as ant properties, so in java call below, |
| 399 | we convert them to system (environment) properties, which is |
| 400 | where PDE expects to find them |
| 401 | --> |
david_williams | 14cadd1 | 2011-03-23 06:43:39 +0000 | [diff] [blame] | 402 | <echo level="debug" message="JavaSE-1.6=${JavaSE-1.6}"/> |
| 403 | <echo level="debug" message="J2SE-1.5=${J2SE-1.5}"/> |
| 404 | <echo level="debug" message="J2SE-1.4=${J2SE-1.4}"/> |
david_williams | ef62fc4 | 2011-03-18 02:33:39 +0000 | [diff] [blame] | 405 | <!-- |
david_williams | 94ffb37 | 2011-02-12 07:11:50 +0000 | [diff] [blame] | 406 | <mkdir dir="${buildDirectory}/${buildLabel}"/> |
| 407 | <mkdir dir="${buildDirectory}/${buildLabel}/buildworkspaces"/> |
david_williams | ef62fc4 | 2011-03-18 02:33:39 +0000 | [diff] [blame] | 408 | --> |
| 409 | <!-- |
david_williams | a7324e4 | 2011-03-06 00:00:01 +0000 | [diff] [blame] | 410 | TODO: should we capture exit code in resultproperty (javaEclipseBuildResult) |
| 411 | and (eventually) take some 'fail' action ... after saving logs, etc.? ... |
| 412 | but where? |
| 413 | --> |
david_williams | ba00a34 | 2011-03-12 05:11:19 +0000 | [diff] [blame] | 414 | <condition |
| 415 | property="antQuietValue" |
| 416 | value="-quiet" |
| 417 | else=""> |
| 418 | <istrue value="${env.USE_QUIET}"/> |
| 419 | </condition> |
david_williams | 2171a5b | 2008-02-10 08:15:08 +0000 | [diff] [blame] | 420 | <java |
| 421 | taskname="build-${build.distribution}-${component}" |
david_williams | ef62fc4 | 2011-03-18 02:33:39 +0000 | [diff] [blame] | 422 | classname="org.eclipse.equinox.launcher.Main" |
david_williams | 9e7f584 | 2011-03-06 03:32:03 +0000 | [diff] [blame] | 423 | fork="true" |
david_williams | a7324e4 | 2011-03-06 00:00:01 +0000 | [diff] [blame] | 424 | failonerror="false" |
| 425 | resultproperty="javaResult"> |
david_williams | ef62fc4 | 2011-03-18 02:33:39 +0000 | [diff] [blame] | 426 | <classpath> |
| 427 | <fileset dir="${pde.builder.path}/plugins"> |
| 428 | <include name="org.eclipse.equinox.launcher_*.jar"/> |
| 429 | </fileset> |
| 430 | </classpath> |
david_williams | 94ffb37 | 2011-02-12 07:11:50 +0000 | [diff] [blame] | 431 | <jvmarg value="-Dosgi.ws=${env.BASEWS}"/> |
| 432 | <jvmarg value="-Dosgi.os=${env.BASEOS}"/> |
| 433 | <jvmarg value="-Dosgi.arch=${env.BASEARCH}"/> |
| 434 | <jvmarg value="-Dbuild.home=${env.BUILD_HOME}"/> |
| 435 | <jvmarg value="-DJAVA_6_HOME=${env.JAVA_6_HOME}"/> |
| 436 | <jvmarg value="-DJAVA_5_HOME=${env.JAVA_5_HOME}"/> |
| 437 | <jvmarg value="-DJAVA_4_HOME=${env.JAVA_4_HOME}"/> |
| 438 | <jvmarg value="-DJavaSE-1.6=${JavaSE-1.6}"/> |
| 439 | <jvmarg value="-DJ2SE-1.5=${J2SE-1.5}"/> |
| 440 | <jvmarg value="-DJ2SE-1.4=${J2SE-1.4}"/> |
| 441 | <jvmarg value="-Dbuild.donottagmaps=${build.donottagmaps}"/> |
| 442 | <jvmarg value="-DbuildType=${buildType}"/> |
| 443 | <jvmarg value="-DdependencyFileLocation=${dependencyFileLocation}"/> |
david_williams | bf62a20 | 2010-09-27 05:03:32 +0000 | [diff] [blame] | 444 | |
david_williams | 94ffb37 | 2011-02-12 07:11:50 +0000 | [diff] [blame] | 445 | <jvmarg value="-DbuildId=${buildId}"/> |
| 446 | <jvmarg value="-DmapVersionTag=${mapVersionTag}"/> |
david_williams | ef62fc4 | 2011-03-18 02:33:39 +0000 | [diff] [blame] | 447 | |
david_williams | 94ffb37 | 2011-02-12 07:11:50 +0000 | [diff] [blame] | 448 | <jvmarg value="-Dprojectname=${projectname}"/> |
| 449 | <jvmarg value="-DbuildLabel=${buildLabel}"/> |
| 450 | <jvmarg value="-Dreleng.jsf-mapVersionTag=${releng.jsf-mapVersionTag}"/> |
| 451 | <jvmarg value="-Dreleng.dali-mapVersionTag=${releng.dali-mapVersionTag}"/> |
| 452 | <jvmarg value="-Dreleng.jsdt-mapVersionTag=${releng.jsdt-mapVersionTag}"/> |
| 453 | <jvmarg value="-Dwtp.builder.home=${wtp.builder.home}"/> |
| 454 | <jvmarg value="-Dbuild.distribution=${build.distribution}"/> |
| 455 | <jvmarg value="-Dcomponent=${component}"/> |
| 456 | <jvmarg value="-Ddependency.properties=${dependency.properties}"/> |
| 457 | <jvmarg value="-DwtpBuildTools.file=${wtpBuildTools.file}"/> |
| 458 | <jvmarg value="-Djava.io.tmpdir=${env.RECOMMENDED_TMP_DIR}"/> |
| 459 | <jvmarg value="-DSKIP_JAR_SIGNING=${SKIP_JAR_SIGNING}"/> |
| 460 | <jvmarg value="-DnormalizeJarFiles=${normalizeJarFiles}"/> |
| 461 | <jvmarg value="-Dosgi.instance.area=${buildDirectory}/${buildLabel}/buildworkspaces/workspace-runbuild-${component}"/> |
| 462 | <arg value="-application"/> |
| 463 | <arg value="org.eclipse.ant.core.antRunner"/> |
david_williams | ba00a34 | 2011-03-12 05:11:19 +0000 | [diff] [blame] | 464 | <arg value="${antQuietValue}"/> |
david_williams | 94ffb37 | 2011-02-12 07:11:50 +0000 | [diff] [blame] | 465 | <arg value="-buildfile"/> |
| 466 | <arg value="${ant.file}"/> |
| 467 | <arg value="build"/> |
david_williams | 2171a5b | 2008-02-10 08:15:08 +0000 | [diff] [blame] | 468 | </java> |
david_williams | a7324e4 | 2011-03-06 00:00:01 +0000 | [diff] [blame] | 469 | |
david_williams | 2171a5b | 2008-02-10 08:15:08 +0000 | [diff] [blame] | 470 | </target> |
| 471 | </project> |