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 | 30dc4fe | 2011-08-13 21:25:10 +0000 | [diff] [blame] | 77 | <echo |
| 78 | level="debug" |
| 79 | message="eclipse.pdebuild.scripts: ${eclipse.pdebuild.scripts}"/> |
david_williams | ef62fc4 | 2011-03-18 02:33:39 +0000 | [diff] [blame] | 80 | |
david_williams | 2171a5b | 2008-02-10 08:15:08 +0000 | [diff] [blame] | 81 | <ant |
| 82 | antfile="build.xml" |
david_williams | ffc9dc2 | 2010-05-01 18:53:48 +0000 | [diff] [blame] | 83 | dir="${eclipse.pdebuild.scripts}"> |
david_williams | 2171a5b | 2008-02-10 08:15:08 +0000 | [diff] [blame] | 84 | <property |
| 85 | name="builder" |
david_williams | ab8b608 | 2009-11-21 19:28:32 +0000 | [diff] [blame] | 86 | value="${wtp.builder.home}/components/${component}"/> |
david_williams | 2171a5b | 2008-02-10 08:15:08 +0000 | [diff] [blame] | 87 | <property |
| 88 | name="wtp.builder.home" |
david_williams | ab8b608 | 2009-11-21 19:28:32 +0000 | [diff] [blame] | 89 | value="${wtp.builder.home}"/> |
david_williams | 2171a5b | 2008-02-10 08:15:08 +0000 | [diff] [blame] | 90 | <property |
| 91 | name="buildBranch" |
david_williams | ab8b608 | 2009-11-21 19:28:32 +0000 | [diff] [blame] | 92 | value="${buildBranch}"/> |
david_williams | 2171a5b | 2008-02-10 08:15:08 +0000 | [diff] [blame] | 93 | <property |
| 94 | name="dependencyTargets" |
david_williams | ab8b608 | 2009-11-21 19:28:32 +0000 | [diff] [blame] | 95 | value="${wtp.builder.home}/scripts/dependency/build.xml"/> |
david_williams | ef62fc4 | 2011-03-18 02:33:39 +0000 | [diff] [blame] | 96 | |
david_williams | 2171a5b | 2008-02-10 08:15:08 +0000 | [diff] [blame] | 97 | <property |
| 98 | name="baseLocation" |
david_williams | ab8b608 | 2009-11-21 19:28:32 +0000 | [diff] [blame] | 99 | value="${env.PROJECT_PROJECTS}/${projectname}/eclipse"/> |
david_williams | 2171a5b | 2008-02-10 08:15:08 +0000 | [diff] [blame] | 100 | <property |
| 101 | name="buildRoot" |
david_williams | ab8b608 | 2009-11-21 19:28:32 +0000 | [diff] [blame] | 102 | value="${env.PROJECT_PROJECTS}/${projectname}"/> |
david_williams | 2171a5b | 2008-02-10 08:15:08 +0000 | [diff] [blame] | 103 | </ant> |
| 104 | </target> |
david_williams | ab8b608 | 2009-11-21 19:28:32 +0000 | [diff] [blame] | 105 | |
david_williams | 11f4fa3 | 2008-05-10 09:32:45 +0000 | [diff] [blame] | 106 | <!-- check if PDE basebuilder and WTP builder is present --> |
david_williams | 2171a5b | 2008-02-10 08:15:08 +0000 | [diff] [blame] | 107 | <target |
| 108 | name="checkBaseBuilder" |
david_williams | ef62fc4 | 2011-03-18 02:33:39 +0000 | [diff] [blame] | 109 | depends="init"> |
david_williams | ab8b608 | 2009-11-21 19:28:32 +0000 | [diff] [blame] | 110 | <!-- |
| 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_williams | 94ffb37 | 2011-02-12 07:11:50 +0000 | [diff] [blame] | 114 | <condition property="basebuilderlocal"> |
david_williams | ef62fc4 | 2011-03-18 02:33:39 +0000 | [diff] [blame] | 115 | <available file="${pde.builder.path}"/> |
david_williams | 2171a5b | 2008-02-10 08:15:08 +0000 | [diff] [blame] | 116 | </condition> |
david_williams | ef62fc4 | 2011-03-18 02:33:39 +0000 | [diff] [blame] | 117 | |
david_williams | 2171a5b | 2008-02-10 08:15:08 +0000 | [diff] [blame] | 118 | </target> |
david_williams | ab8b608 | 2009-11-21 19:28:32 +0000 | [diff] [blame] | 119 | <!-- |
| 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_williams | 2171a5b | 2008-02-10 08:15:08 +0000 | [diff] [blame] | 127 | <target |
| 128 | name="getBaseBuilder" |
david_williams | ef62fc4 | 2011-03-18 02:33:39 +0000 | [diff] [blame] | 129 | depends="init,checkBaseBuilder,installedEclipseBuilder,installEclipseBuilder,touchBaseBuilder" |
| 130 | if="eclipse.builder.fetch" |
david_williams | 2171a5b | 2008-02-10 08:15:08 +0000 | [diff] [blame] | 131 | unless="basebuilderlocal"> |
david_williams | ab8b608 | 2009-11-21 19:28:32 +0000 | [diff] [blame] | 132 | |
david_williams | ef62fc4 | 2011-03-18 02:33:39 +0000 | [diff] [blame] | 133 | <fail if="p2DirectorInstallFailed"/> |
| 134 | |
david_williams | 30dc4fe | 2011-08-13 21:25:10 +0000 | [diff] [blame] | 135 | <echo |
| 136 | level="debug" |
| 137 | message="installed eclipse builder: ${pde.builder.path}"/> |
david_williams | ef62fc4 | 2011-03-18 02:33:39 +0000 | [diff] [blame] | 138 | |
david_williams | 2171a5b | 2008-02-10 08:15:08 +0000 | [diff] [blame] | 139 | </target> |
david_williams | 94ffb37 | 2011-02-12 07:11:50 +0000 | [diff] [blame] | 140 | |
david_williams | ef62fc4 | 2011-03-18 02:33:39 +0000 | [diff] [blame] | 141 | <target |
| 142 | name="installedEclipseBuilder" |
| 143 | depends="init,checkBaseBuilder" |
| 144 | if="basebuilderlocal"> |
| 145 | |
david_williams | 30dc4fe | 2011-08-13 21:25:10 +0000 | [diff] [blame] | 146 | <echo |
| 147 | level="debug" |
| 148 | message="found installed eclipse builder: ${pde.builder.path}"/> |
david_williams | ef62fc4 | 2011-03-18 02:33:39 +0000 | [diff] [blame] | 149 | |
| 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 Anderson | 3cf4340 | 2012-08-15 12:27:17 -0400 | [diff] [blame] | 173 | 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_williams | ef62fc4 | 2011-03-18 02:33:39 +0000 | [diff] [blame] | 181 | 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_williams | 9e7f584 | 2011-03-06 03:32:03 +0000 | [diff] [blame] | 190 | 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_williams | 94ffb37 | 2011-02-12 07:11:50 +0000 | [diff] [blame] | 194 | <target |
| 195 | name="touchBaseBuilder" |
david_williams | ef62fc4 | 2011-03-18 02:33:39 +0000 | [diff] [blame] | 196 | depends="init" |
david_williams | 94ffb37 | 2011-02-12 07:11:50 +0000 | [diff] [blame] | 197 | if="basebuilderlocal"> |
david_williams | 9a108fb | 2011-02-12 07:30:52 +0000 | [diff] [blame] | 198 | <touch> |
david_williams | ef62fc4 | 2011-03-18 02:33:39 +0000 | [diff] [blame] | 199 | <fileset dir="${eclipse.builder.base.install.dir}"/> |
david_williams | 2398e36 | 2011-03-05 02:45:39 +0000 | [diff] [blame] | 200 | </touch> |
david_williams | 94ffb37 | 2011-02-12 07:11:50 +0000 | [diff] [blame] | 201 | </target> |
david_williams | 9e7f584 | 2011-03-06 03:32:03 +0000 | [diff] [blame] | 202 | |
david_williams | ab8b608 | 2009-11-21 19:28:32 +0000 | [diff] [blame] | 203 | <!-- |
| 204 | check wtpBulderPresent property if false, download WTP builder |
| 205 | file org.eclipse.wtp.releng.tools_version.jar into baseBuiders |
| 206 | --> |
david_williams | 2171a5b | 2008-02-10 08:15:08 +0000 | [diff] [blame] | 207 | <target |
| 208 | name="getWTPBaseBuilder" |
david_williams | ef62fc4 | 2011-03-18 02:33:39 +0000 | [diff] [blame] | 209 | 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 Anderson | f1859b7 | 2013-10-07 14:01:59 -0400 | [diff] [blame^] | 218 | jvm="${env.JAVA_7_HOME}/bin/java" |
david_williams | ef62fc4 | 2011-03-18 02:33:39 +0000 | [diff] [blame] | 219 | 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_williams | 30dc4fe | 2011-08-13 21:25:10 +0000 | [diff] [blame] | 256 | <echo |
| 257 | level="debug" |
| 258 | message="p2DirectorInstallResult: ${p2DirectorInstallResult}"/> |
david_williams | ef62fc4 | 2011-03-18 02:33:39 +0000 | [diff] [blame] | 259 | |
| 260 | <condition property="p2DirectorInstallFailed"> |
| 261 | <not> |
| 262 | <equals |
| 263 | arg1="0" |
| 264 | arg2="${p2DirectorInstallResult}"/> |
| 265 | </not> |
david_williams | 2171a5b | 2008-02-10 08:15:08 +0000 | [diff] [blame] | 266 | </condition> |
david_williams | ef62fc4 | 2011-03-18 02:33:39 +0000 | [diff] [blame] | 267 | |
david_williams | 2171a5b | 2008-02-10 08:15:08 +0000 | [diff] [blame] | 268 | </target> |
david_williams | ab8b608 | 2009-11-21 19:28:32 +0000 | [diff] [blame] | 269 | |
david_williams | ef62fc4 | 2011-03-18 02:33:39 +0000 | [diff] [blame] | 270 | |
david_williams | ab8b608 | 2009-11-21 19:28:32 +0000 | [diff] [blame] | 271 | <!-- set buildBranch, and create label.properties--> |
david_williams | ef62fc4 | 2011-03-18 02:33:39 +0000 | [diff] [blame] | 272 | <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_williams | 2171a5b | 2008-02-10 08:15:08 +0000 | [diff] [blame] | 296 | <property |
david_williams | ef62fc4 | 2011-03-18 02:33:39 +0000 | [diff] [blame] | 297 | 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_williams | 14cadd1 | 2011-03-23 06:43:39 +0000 | [diff] [blame] | 308 | level="debug" |
david_williams | ef62fc4 | 2011-03-18 02:33:39 +0000 | [diff] [blame] | 309 | 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_williams | ab8b608 | 2009-11-21 19:28:32 +0000 | [diff] [blame] | 327 | <!-- |
| 328 | strip trailing blanks. Seems either Eclipse, or CVS make it |
| 329 | hard to not have trailing spaces |
| 330 | --> |
david_williams | 2171a5b | 2008-02-10 08:15:08 +0000 | [diff] [blame] | 331 | <replaceregexp |
| 332 | flags="gm" |
| 333 | file="${wtp.builder.home}/build.properties" |
| 334 | match=" *$" |
david_williams | ab8b608 | 2009-11-21 19:28:32 +0000 | [diff] [blame] | 335 | replace=""/> |
david_williams | 94ffb37 | 2011-02-12 07:11:50 +0000 | [diff] [blame] | 336 | <property file="${wtp.builder.home}/build.properties"/> |
| 337 | <ant antfile="${wtp.builder.home}/scripts/build/label.xml"/> |
david_williams | ef62fc4 | 2011-03-18 02:33:39 +0000 | [diff] [blame] | 338 | |
david_williams | 94ffb37 | 2011-02-12 07:11:50 +0000 | [diff] [blame] | 339 | <property file="${buildDirectory}/label.properties"/> |
david_williams | ef62fc4 | 2011-03-18 02:33:39 +0000 | [diff] [blame] | 340 | |
david_williams | ab8b608 | 2009-11-21 19:28:32 +0000 | [diff] [blame] | 341 | <!-- |
| 342 | fetch the HEAD stream of all projects if build type |
| 343 | specified as N |
| 344 | --> |
david_williams | 2171a5b | 2008-02-10 08:15:08 +0000 | [diff] [blame] | 345 | <condition |
| 346 | property="fetchTag" |
Carl Anderson | 3cf4340 | 2012-08-15 12:27:17 -0400 | [diff] [blame] | 347 | value="CVS=HEAD,GIT=origin/master"> |
david_williams | 2171a5b | 2008-02-10 08:15:08 +0000 | [diff] [blame] | 348 | <equals |
| 349 | arg1="${buildType}" |
david_williams | ab8b608 | 2009-11-21 19:28:32 +0000 | [diff] [blame] | 350 | arg2="N"/> |
david_williams | 2171a5b | 2008-02-10 08:15:08 +0000 | [diff] [blame] | 351 | </condition> |
david_williams | ab8b608 | 2009-11-21 19:28:32 +0000 | [diff] [blame] | 352 | <!-- |
| 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_williams | 94ffb37 | 2011-02-12 07:11:50 +0000 | [diff] [blame] | 357 | <condition property="doBuild"> |
david_williams | ab8b608 | 2009-11-21 19:28:32 +0000 | [diff] [blame] | 358 | <available |
| 359 | file="${wtp.builder.home}/components/${component}" |
| 360 | type="dir"/> |
| 361 | </condition> |
david_williams | ef62fc4 | 2011-03-18 02:33:39 +0000 | [diff] [blame] | 362 | |
| 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_williams | 2171a5b | 2008-02-10 08:15:08 +0000 | [diff] [blame] | 372 | </target> |
| 373 | <target |
| 374 | name="runEclipseBuild" |
david_williams | ef62fc4 | 2011-03-18 02:33:39 +0000 | [diff] [blame] | 375 | depends="init" |
david_williams | 2171a5b | 2008-02-10 08:15:08 +0000 | [diff] [blame] | 376 | if="buildId"> |
david_williams | ef62fc4 | 2011-03-18 02:33:39 +0000 | [diff] [blame] | 377 | |
david_williams | ab8b608 | 2009-11-21 19:28:32 +0000 | [diff] [blame] | 378 | <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_williams | 2171a5b | 2008-02-10 08:15:08 +0000 | [diff] [blame] | 388 | <property |
| 389 | name="J2SE-1.4" |
david_williams | ab8b608 | 2009-11-21 19:28:32 +0000 | [diff] [blame] | 390 | 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] | 391 | <property |
| 392 | name="J2SE-1.5" |
david_williams | 968300b | 2010-10-19 05:19:55 +0000 | [diff] [blame] | 393 | 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] | 394 | <property |
david_williams | e2d1519 | 2008-09-22 04:54:32 +0000 | [diff] [blame] | 395 | name="JavaSE-1.6" |
tle | 0433ce6 | 2011-02-03 21:59:29 +0000 | [diff] [blame] | 396 | 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 Anderson | f1859b7 | 2013-10-07 14:01:59 -0400 | [diff] [blame^] | 397 | <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_williams | ebe9e5d | 2011-07-02 02:37:52 +0000 | [diff] [blame] | 402 | 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_williams | ab8b608 | 2009-11-21 19:28:32 +0000 | [diff] [blame] | 404 | --> |
david_williams | 2171a5b | 2008-02-10 08:15:08 +0000 | [diff] [blame] | 405 | <property |
david_williams | 7d822c8 | 2008-02-24 04:27:41 +0000 | [diff] [blame] | 406 | name="build.donottagmaps" |
david_williams | ab8b608 | 2009-11-21 19:28:32 +0000 | [diff] [blame] | 407 | value="false"/> |
Carl Anderson | f1859b7 | 2013-10-07 14:01:59 -0400 | [diff] [blame^] | 408 | <fail |
| 409 | unless="JavaSE-1.7" |
| 410 | message="classpath to JavaSE-1.7 Execution Environment must be set"/> |
| 411 | <fail |
david_williams | e2d1519 | 2008-09-22 04:54:32 +0000 | [diff] [blame] | 412 | unless="JavaSE-1.6" |
david_williams | ab8b608 | 2009-11-21 19:28:32 +0000 | [diff] [blame] | 413 | message="classpath to JavaSE-1.6 Execution Environment must be set"/> |
david_williams | 2171a5b | 2008-02-10 08:15:08 +0000 | [diff] [blame] | 414 | <fail |
| 415 | unless="J2SE-1.5" |
david_williams | ab8b608 | 2009-11-21 19:28:32 +0000 | [diff] [blame] | 416 | message="classpath to J2SE-1.5 Execution Environment must be set"/> |
david_williams | 2171a5b | 2008-02-10 08:15:08 +0000 | [diff] [blame] | 417 | <fail |
| 418 | unless="J2SE-1.4" |
david_williams | ab8b608 | 2009-11-21 19:28:32 +0000 | [diff] [blame] | 419 | 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_williams | 30dc4fe | 2011-08-13 21:25:10 +0000 | [diff] [blame] | 425 | <!-- |
| 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_williams | 19819fe | 2011-08-13 21:41:07 +0000 | [diff] [blame] | 429 | 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_williams | 30dc4fe | 2011-08-13 21:25:10 +0000 | [diff] [blame] | 435 | --> |
| 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_williams | ef62fc4 | 2011-03-18 02:33:39 +0000 | [diff] [blame] | 446 | <!-- |
david_williams | 94ffb37 | 2011-02-12 07:11:50 +0000 | [diff] [blame] | 447 | <mkdir dir="${buildDirectory}/${buildLabel}"/> |
| 448 | <mkdir dir="${buildDirectory}/${buildLabel}/buildworkspaces"/> |
david_williams | ef62fc4 | 2011-03-18 02:33:39 +0000 | [diff] [blame] | 449 | --> |
| 450 | <!-- |
david_williams | a7324e4 | 2011-03-06 00:00:01 +0000 | [diff] [blame] | 451 | 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_williams | ba00a34 | 2011-03-12 05:11:19 +0000 | [diff] [blame] | 455 | <condition |
| 456 | property="antQuietValue" |
| 457 | value="-quiet" |
| 458 | else=""> |
| 459 | <istrue value="${env.USE_QUIET}"/> |
| 460 | </condition> |
david_williams | 2171a5b | 2008-02-10 08:15:08 +0000 | [diff] [blame] | 461 | <java |
| 462 | taskname="build-${build.distribution}-${component}" |
david_williams | ef62fc4 | 2011-03-18 02:33:39 +0000 | [diff] [blame] | 463 | classname="org.eclipse.equinox.launcher.Main" |
david_williams | 9e7f584 | 2011-03-06 03:32:03 +0000 | [diff] [blame] | 464 | fork="true" |
david_williams | a7324e4 | 2011-03-06 00:00:01 +0000 | [diff] [blame] | 465 | failonerror="false" |
| 466 | resultproperty="javaResult"> |
david_williams | ef62fc4 | 2011-03-18 02:33:39 +0000 | [diff] [blame] | 467 | <classpath> |
| 468 | <fileset dir="${pde.builder.path}/plugins"> |
| 469 | <include name="org.eclipse.equinox.launcher_*.jar"/> |
| 470 | </fileset> |
| 471 | </classpath> |
david_williams | 94ffb37 | 2011-02-12 07:11:50 +0000 | [diff] [blame] | 472 | <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 Anderson | f1859b7 | 2013-10-07 14:01:59 -0400 | [diff] [blame^] | 476 | <jvmarg value="-DJAVA_7_HOME=${env.JAVA_7_HOME}"/> |
| 477 | <jvmarg value="-DJAVA_6_HOME=${env.JAVA_6_HOME}"/> |
david_williams | 94ffb37 | 2011-02-12 07:11:50 +0000 | [diff] [blame] | 478 | <jvmarg value="-DJAVA_5_HOME=${env.JAVA_5_HOME}"/> |
| 479 | <jvmarg value="-DJAVA_4_HOME=${env.JAVA_4_HOME}"/> |
Carl Anderson | f1859b7 | 2013-10-07 14:01:59 -0400 | [diff] [blame^] | 480 | <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_williams | 94ffb37 | 2011-02-12 07:11:50 +0000 | [diff] [blame] | 483 | <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_williams | bf62a20 | 2010-09-27 05:03:32 +0000 | [diff] [blame] | 487 | |
david_williams | 94ffb37 | 2011-02-12 07:11:50 +0000 | [diff] [blame] | 488 | <jvmarg value="-DbuildId=${buildId}"/> |
| 489 | <jvmarg value="-DmapVersionTag=${mapVersionTag}"/> |
david_williams | ef62fc4 | 2011-03-18 02:33:39 +0000 | [diff] [blame] | 490 | |
david_williams | 94ffb37 | 2011-02-12 07:11:50 +0000 | [diff] [blame] | 491 | <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_williams | ba00a34 | 2011-03-12 05:11:19 +0000 | [diff] [blame] | 507 | <arg value="${antQuietValue}"/> |
david_williams | 94ffb37 | 2011-02-12 07:11:50 +0000 | [diff] [blame] | 508 | <arg value="-buildfile"/> |
| 509 | <arg value="${ant.file}"/> |
| 510 | <arg value="build"/> |
david_williams | 2171a5b | 2008-02-10 08:15:08 +0000 | [diff] [blame] | 511 | </java> |
david_williams | a7324e4 | 2011-03-06 00:00:01 +0000 | [diff] [blame] | 512 | |
david_williams | 2171a5b | 2008-02-10 08:15:08 +0000 | [diff] [blame] | 513 | </target> |
| 514 | </project> |