org.eclipse.dash/athena/org.eclipse.dash.commonbuilder/org.eclipse.dash.common.releng/tools/scripts/buildAllHelper.xml
Parent Directory
|
Revision Log
Revision 1.140 - (view) (download) (as text)
| 1 : | nickb | 1.61 | <project name="buildAllHelper.xml : helpful methods for signing, packing and all kinds of crazy crap"> |
| 2 : | nickb | 1.1 | |
| 3 : | nickb | 1.120 | <target name="initCommandlineArgsList"> |
| 4 : | <!-- These variables can be set via commandline (Ant -Dflag) or in project's .releng/build.properties as | ||
| 5 : | overrides for default values in .common.releng/build.properties or .common.releng/server.properties. | ||
| 6 : | See buildAll.xml#runEclipse and buildAllHelper.xml#createBuildConfigFile for usage | ||
| 7 : | nickb | 1.123 | Note that these will be loaded IN ORDER LISTED so for variables that depend on other variables, MUST list in |
| 8 : | proper order (eg., if thirdPartyJarsDir = ${writableBuildRoot}/3rdPartyJars, must list writableBuildRoot first) | ||
| 9 : | nickb | 1.120 | --> |
| 10 : | <property name="commandlineArgsList" | ||
| 11 : | nickb | 1.126 | value=" |
| 12 : | nickb | 1.123 | version |
| 13 : | projectid | ||
| 14 : | topprojectName | ||
| 15 : | projectName | ||
| 16 : | subprojectName | ||
| 17 : | |||
| 18 : | buildType | ||
| 19 : | buildTimestamp | ||
| 20 : | nickb | 1.120 | buildAlias |
| 21 : | nickb | 1.136 | zipPrefix |
| 22 : | incubation | ||
| 23 : | nickb | 1.123 | |
| 24 : | nickb | 1.120 | build.steps |
| 25 : | nickb | 1.123 | packageFeaturesIncludedBinaries |
| 26 : | nickb | 1.125 | failBuildIfTestFailuresOrErrors |
| 27 : | nickb | 1.120 | forceContextQualifier |
| 28 : | nickb | 1.123 | |
| 29 : | nickb | 1.120 | JAVA_HOME |
| 30 : | nickb | 1.132 | PACK200_JAVA_HOME |
| 31 : | nickb | 1.123 | writableBuildRoot |
| 32 : | thirdPartyJarsDir | ||
| 33 : | downloadsDir | ||
| 34 : | buildDir | ||
| 35 : | relengBuilderDir | ||
| 36 : | relengBaseBuilderDir | ||
| 37 : | relengCommonBuilderDir | ||
| 38 : | relengCommonScriptsDir | ||
| 39 : | |||
| 40 : | nickb | 1.120 | localSourceCheckoutDir |
| 41 : | localSourceCheckoutDirExcludes | ||
| 42 : | nickb | 1.123 | |
| 43 : | branch | ||
| 44 : | projRelengBranch | ||
| 45 : | commonRelengBranch | ||
| 46 : | basebuilderBranch | ||
| 47 : | fetchTag | ||
| 48 : | |||
| 49 : | nickb | 1.120 | noclean |
| 50 : | nickb | 1.123 | buildcfg |
| 51 : | |||
| 52 : | dependencyURLs | ||
| 53 : | repositoryURLs | ||
| 54 : | featureIDsToInstall | ||
| 55 : | nickb | 1.120 | pluginIDsToInstall |
| 56 : | nickb | 1.134 | IUsToInstall |
| 57 : | nickb | 1.123 | projectSetFiles" |
| 58 : | nickb | 1.120 | /> |
| 59 : | </target> | ||
| 60 : | |||
| 61 : | nickb | 1.122 | <target name="init"> |
| 62 : | nickb | 1.30 | |
| 63 : | nickb | 1.36 | <property name="writableBuildRoot" value="/opt/public/cbi/build" /> |
| 64 : | nickb | 1.34 | <property name="thirdPartyJarsDir" value="${writableBuildRoot}/3rdPartyJars" /> |
| 65 : | nickb | 1.30 | |
| 66 : | nickb | 1.18 | <taskdef resource="net/sf/antcontrib/antlib.xml"> |
| 67 : | <classpath> | ||
| 68 : | <pathelement path="${classpath}" /> | ||
| 69 : | nickb | 1.30 | <pathelement location="${relengCommonBuilderDir}/lib/ant-contrib.jar" /> |
| 70 : | <pathelement location="${relengBuilderDir}/lib/ant-contrib.jar" /> | ||
| 71 : | nickb | 1.18 | <pathelement location="${thirdPartyJarsDir}/ant-contrib.jar" /> |
| 72 : | nickb | 1.30 | <pathelement location="/usr/share/java/ant-contrib.jar" /> |
| 73 : | nickb | 1.18 | </classpath> |
| 74 : | </taskdef> | ||
| 75 : | </target> | ||
| 76 : | |||
| 77 : | nickb | 1.63 | <target name="get.pde.build.svn" description="make sure SVN mapfile support is available"> |
| 78 : | <if> | ||
| 79 : | <not> | ||
| 80 : | <available file="${relengBaseBuilderDir}/plugins/org.eclipse.pde.build.svn_1.0.1.v20070222.jar" type="file" /> | ||
| 81 : | </not> | ||
| 82 : | <then> | ||
| 83 : | <if> | ||
| 84 : | <available file="${downloadsDir}/org.eclipse.pde.build.svn-1.0.1RC2.zip" /> | ||
| 85 : | <then> | ||
| 86 : | <echo>Found ${downloadsDir}/org.eclipse.pde.build.svn-1.0.1RC2.zip</echo> | ||
| 87 : | </then> | ||
| 88 : | <else> | ||
| 89 : | <!-- download the requirement, if permitted by license agreement --> | ||
| 90 : | <echo>Third Party Download License Agreement: ${thirdPartyDownloadLicenseAcceptance}</echo> | ||
| 91 : | <if> | ||
| 92 : | <and> | ||
| 93 : | <isset property="thirdPartyDownloadLicenseAcceptance" /> | ||
| 94 : | <equals arg1="${thirdPartyDownloadLicenseAcceptance}" arg2=""I accept"" /> | ||
| 95 : | </and> | ||
| 96 : | <then> | ||
| 97 : | <get src="http://downloads.sourceforge.net/svn-pde-build/org.eclipse.pde.build.svn-1.0.1RC2.zip" | ||
| 98 : | dest="${downloadsDir}/org.eclipse.pde.build.svn-1.0.1RC2.zip" | ||
| 99 : | usetimestamp="true" | ||
| 100 : | /> | ||
| 101 : | <touch file="${downloadsDir}/org.eclipse.pde.build.svn-1.0.1RC2.zip" /> | ||
| 102 : | </then> | ||
| 103 : | </if> | ||
| 104 : | </else> | ||
| 105 : | </if> | ||
| 106 : | <if> | ||
| 107 : | <available file="${downloadsDir}/org.eclipse.pde.build.svn-1.0.1RC2.zip" /> | ||
| 108 : | <then> | ||
| 109 : | <!-- | ||
| 110 : | Note that ${relengBaseBuilderDir} must be writable for this to be updated automatically. If running in Hudson | ||
| 111 : | and ${relengBaseBuilderDir} is a symlink to a read-only dir, this will fail. You will need to update this by hand. | ||
| 112 : | --> | ||
| 113 : | <mkdir dir="/tmp/org.eclipse.pde.build.svn" /> | ||
| 114 : | <unzip src="${downloadsDir}/org.eclipse.pde.build.svn-1.0.1RC2.zip" dest="/tmp/org.eclipse.pde.build.svn" overwrite="true" /> | ||
| 115 : | <if> | ||
| 116 : | <available file="/tmp/org.eclipse.pde.build.svn/org.eclipse.releng.basebuilder/features" type="dir" /> | ||
| 117 : | <then> | ||
| 118 : | <mkdir dir="${relengBaseBuilderDir}/features" /> | ||
| 119 : | <move todir="${relengBaseBuilderDir}/features"> | ||
| 120 : | <fileset dir="/tmp/org.eclipse.pde.build.svn/org.eclipse.releng.basebuilder/features" /> | ||
| 121 : | </move> | ||
| 122 : | </then> | ||
| 123 : | </if> | ||
| 124 : | <mkdir dir="${relengBaseBuilderDir}/plugins" /> | ||
| 125 : | <move todir="${relengBaseBuilderDir}/plugins"> | ||
| 126 : | <fileset dir="/tmp/org.eclipse.pde.build.svn/org.eclipse.releng.basebuilder/plugins" /> | ||
| 127 : | </move> | ||
| 128 : | <delete dir="/tmp/org.eclipse.pde.build.svn" /> | ||
| 129 : | </then> | ||
| 130 : | <else> | ||
| 131 : | <echo>Warning! | ||
| 132 : | Cannot find org.eclipse.pde.build.svn-1.0.1RC2.zip. | ||
| 133 : | If your build depends on sources in an SVN repository, it will fail. | ||
| 134 : | You can manually download this zip into ${downloadsDir} from http://downloads.sourceforge.net/svn-pde-build/org.eclipse.pde.build.svn-1.0.1RC2.zip | ||
| 135 : | Or, to download this automatically, see ${relengCommonBuilderDir}/build.properties#thirdPartyDownloadLicenseAcceptance. | ||
| 136 : | nickb | 1.93 | </echo> |
| 137 : | nickb | 1.63 | </else> |
| 138 : | </if> | ||
| 139 : | </then> | ||
| 140 : | </if> | ||
| 141 : | </target> | ||
| 142 : | <target name="get.ant4eclipse" description="make sure ant4eclipse support is available"> | ||
| 143 : | <if> | ||
| 144 : | <not> | ||
| 145 : | nickb | 1.66 | <available file="${relengCommonBuilderDir}/lib/ant4eclipse.jar" type="file" /> |
| 146 : | nickb | 1.63 | </not> |
| 147 : | <then> | ||
| 148 : | <if> | ||
| 149 : | <available file="${downloadsDir}/ant4eclipse-0.5.0.rc1.zip" /> | ||
| 150 : | <then> | ||
| 151 : | <echo>Found ${downloadsDir}/ant4eclipse-0.5.0.rc1.zip</echo> | ||
| 152 : | </then> | ||
| 153 : | <else> | ||
| 154 : | <!-- download the requirement, if permitted by license agreement --> | ||
| 155 : | <echo>Third Party Download License Agreement: ${thirdPartyDownloadLicenseAcceptance}</echo> | ||
| 156 : | <if> | ||
| 157 : | <and> | ||
| 158 : | <isset property="thirdPartyDownloadLicenseAcceptance" /> | ||
| 159 : | nickb | 1.112 | <or> |
| 160 : | nickb | 1.113 | <equals arg1="${thirdPartyDownloadLicenseAcceptance}" arg2="Y" /> |
| 161 : | nickb | 1.112 | <equals arg1="${thirdPartyDownloadLicenseAcceptance}" arg2="I accept" /> |
| 162 : | <equals arg1="${thirdPartyDownloadLicenseAcceptance}" arg2=""I accept"" /> | ||
| 163 : | </or> | ||
| 164 : | nickb | 1.63 | </and> |
| 165 : | <then> | ||
| 166 : | <get src="http://downloads.sourceforge.net/sourceforge/ant4eclipse/ant4eclipse-0.5.0.rc1.zip" | ||
| 167 : | dest="${downloadsDir}/ant4eclipse-0.5.0.rc1.zip" | ||
| 168 : | usetimestamp="true" | ||
| 169 : | /> | ||
| 170 : | <touch file="${downloadsDir}/ant4eclipse-0.5.0.rc1.zip" /> | ||
| 171 : | </then> | ||
| 172 : | </if> | ||
| 173 : | </else> | ||
| 174 : | </if> | ||
| 175 : | <if> | ||
| 176 : | <available file="${downloadsDir}/ant4eclipse-0.5.0.rc1.zip" /> | ||
| 177 : | <then> | ||
| 178 : | <!-- | ||
| 179 : | Note that ${relengCommonBuilderDir} must be writable for this to be updated automatically. If running in Hudson | ||
| 180 : | and ${relengCommonBuilderDir} is a symlink to a read-only dir, this will fail. You will need to update this by hand. | ||
| 181 : | --> | ||
| 182 : | <mkdir dir="/tmp/net.sf.ant4eclipse" /> | ||
| 183 : | <unzip src="${downloadsDir}/ant4eclipse-0.5.0.rc1.zip" dest="/tmp/net.sf.ant4eclipse" overwrite="true" /> | ||
| 184 : | <move file="/tmp/net.sf.ant4eclipse/ant4eclipse-0.5.0.rc1.jar" tofile="${relengCommonBuilderDir}/lib/ant4eclipse.jar" /> | ||
| 185 : | <delete dir="/tmp/net.sf.ant4eclipse" /> | ||
| 186 : | </then> | ||
| 187 : | <else> | ||
| 188 : | <echo>Warning! | ||
| 189 : | Cannot find ant4eclipse-0.5.0.rc1.zip. | ||
| 190 : | If your build depends on fetching sources from a .psf file, it will fail. | ||
| 191 : | You can manually download this zip into ${downloadsDir} from http://downloads.sourceforge.net/sourceforge/ant4eclipse/ant4eclipse-0.5.0.rc1.zip, | ||
| 192 : | then place the renamed jar (ant4eclipse.jar) into ${relengCommonBuilderDir}/lib. | ||
| 193 : | Or, to download this automatically, see ${relengCommonBuilderDir}/build.properties#thirdPartyDownloadLicenseAcceptance. | ||
| 194 : | nickb | 1.93 | </echo> |
| 195 : | nickb | 1.63 | </else> |
| 196 : | </if> | ||
| 197 : | </then> | ||
| 198 : | </if> | ||
| 199 : | </target> | ||
| 200 : | |||
| 201 : | nickb | 1.1 | <target name="copyJars"> |
| 202 : | nickb | 1.23 | <!-- |
| 203 : | must load a properties file first, eg. | ||
| 204 : | nickb | 1.76 | <property file="${buildDirectory}/../${projRelengName}/builder/sdk/extraJars.properties" /> |
| 205 : | nickb | 1.1 | --> |
| 206 : | <echo message="Copy ${jars} ..." /> | ||
| 207 : | <mkdir dir="${buildDirectory}/${dir}" /> | ||
| 208 : | <copy todir="${buildDirectory}/${dir}" failonerror="true" verbose="true"> | ||
| 209 : | nickb | 1.11 | <fileset dir="${thirdPartyJarsDir}" includes="${jars}" /> |
| 210 : | nickb | 1.1 | <mapper type="flatten" /> |
| 211 : | </copy> | ||
| 212 : | </target> | ||
| 213 : | |||
| 214 : | <!-- echo timestamp into log: format can be "MM/dd/yyyy hh:mm:ss aa" or "hh:mm:ss" --> | ||
| 215 : | <target name="-timestamp"> | ||
| 216 : | <tstamp> | ||
| 217 : | <format property="-timestamp" pattern="hh:mm:ss" /> | ||
| 218 : | </tstamp> | ||
| 219 : | <echo>${-timestamp}</echo> | ||
| 220 : | </target> | ||
| 221 : | |||
| 222 : | nickb | 1.10 | <target name="unpackUpdateJarsAndRepack" |
| 223 : | description="Use this in to convert a Master zip (with jarred features and plugins) to an SDK zip (with unpacked features and mix of jarred/unpacked plugins)." | ||
| 224 : | > | ||
| 225 : | nickb | 1.1 | <!-- must be set when called: should be masterZip containing features and plugins as ONLY jars, no folders --> |
| 226 : | nickb | 1.10 | <property name="sourceZip" value="${buildDirectory}/${buildLabel}/${archiveName}" /> |
| 227 : | nickb | 1.1 | <!-- must be set when called; could be sdkZip, allZip, etc; by default, useful in customTargets.xml#postBuild (see gmf.releng) --> |
| 228 : | nickb | 1.10 | <property name="targetZip" value="${buildDirectory}/${buildLabel}/${archiveName}" /> |
| 229 : | nickb | 1.1 | |
| 230 : | <property name="tmpsite" value="${buildDirectory}/unpacktmp" /> | ||
| 231 : | <mkdir dir="${tmpsite}/new/eclipse/features" /> | ||
| 232 : | <mkdir dir="${tmpsite}/new/eclipse/plugins" /> | ||
| 233 : | nickb | 1.10 | <unzip src="${sourceZip}" dest="${tmpsite}" /> |
| 234 : | nickb | 1.1 | <unpackUpdateJars site="${tmpsite}/eclipse" output="${tmpsite}/new/eclipse" /> |
| 235 : | <!-- copy root files (if applicable?) --> | ||
| 236 : | <copy todir="${tmpsite}/new/eclipse"> | ||
| 237 : | <fileset dir="${tmpsite}/eclipse"> | ||
| 238 : | <include name="*" /> | ||
| 239 : | </fileset> | ||
| 240 : | </copy> | ||
| 241 : | <zip destfile="${targetZip}" basedir="${tmpsite}/new" /> | ||
| 242 : | <delete dir="${tmpsite}" /> | ||
| 243 : | </target> | ||
| 244 : | |||
| 245 : | nickb | 1.10 | <target name="removeRootFilesFromMaster" |
| 246 : | description="Use this to purge any rootfiles from the Master zip, and either create a new zip or replace an existing one" | ||
| 247 : | > | ||
| 248 : | <property name="sourceZip" value="${buildDirectory}/${buildLabel}/${masterZip}" /> | ||
| 249 : | <!-- can override defaults here --> | ||
| 250 : | <property name="targetZip" value="${buildDirectory}/${buildLabel}/${masterZip}" /> | ||
| 251 : | <!-- can override defaults here --> | ||
| 252 : | nickb | 1.1 | <zip destfile="${sourceZip}_" update="true"> |
| 253 : | nickb | 1.63 | <zipfileset src="${sourceZip}" dirmode="775" filemode="664" includes="**/*.jar, **/*.jar.pack.gz, **/pack.properties, *.jar, site.xml" /> |
| 254 : | nickb | 1.1 | </zip> |
| 255 : | nickb | 1.10 | <move file="${sourceZip}_" tofile="${targetZip}" overwrite="true" verbose="false" failonerror="true" /> |
| 256 : | nickb | 1.1 | </target> |
| 257 : | |||
| 258 : | <!-- remove all but *.jar & *.jar.pack.gz from Master zip so it can be used for Update site generation --> | ||
| 259 : | <target name="removeFeatureAndPluginFoldersFromMasterZip"> | ||
| 260 : | <zip destfile="${buildDirectory}/${buildLabel}/${masterZip}.tmp" update="true"> | ||
| 261 : | nickb | 1.10 | <zipfileset src="${buildDirectory}/${buildLabel}/${masterZip}" |
| 262 : | dirmode="775" | ||
| 263 : | filemode="664" | ||
| 264 : | includes="**/plugins/*.jar, **/plugins/*.jar.pack.gz, **/features/*.jar, **/features/*.jar.pack.gz" | ||
| 265 : | /> | ||
| 266 : | nickb | 1.1 | </zip> |
| 267 : | <move file="${buildDirectory}/${buildLabel}/${masterZip}.tmp" tofile="${buildDirectory}/${buildLabel}/${masterZip}" overwrite="true" /> | ||
| 268 : | </target> | ||
| 269 : | |||
| 270 : | nickb | 1.105 | <!--poll file for change in attributes: while running /usr/bin/sign, you can watch /tmp/jarsigner for progress --> |
| 271 : | <target name="checkForSignedZip"> | ||
| 272 : | nickb | 1.12 | <if> |
| 273 : | nickb | 1.33 | <equals arg1="${buildServerUser}" arg2="" /> |
| 274 : | nickb | 1.12 | <then> |
| 275 : | nickb | 1.105 | <exec dir="${buildDirectory}" executable="ls" outputProperty="-checkResults"> |
| 276 : | nickb | 1.12 | <arg line="${execline}" /> |
| 277 : | </exec> | ||
| 278 : | </then> | ||
| 279 : | <else> | ||
| 280 : | nickb | 1.105 | <exec dir="${buildDirectory}" executable="ssh" outputProperty="-checkResults"> |
| 281 : | nickb | 1.12 | <arg line="${execline}" /> |
| 282 : | </exec> | ||
| 283 : | </else> | ||
| 284 : | </if> | ||
| 285 : | nickb | 1.14 | |
| 286 : | <if> | ||
| 287 : | nickb | 1.105 | <or> |
| 288 : | <!-- failure conditions --> | ||
| 289 : | <contains string="${-checkResults}" substring="Host key verification failed." casesensitive="no" /> | ||
| 290 : | <contains string="${-checkResults}" substring="Permission denied, please try again." casesensitive="no" /> | ||
| 291 : | <contains string="${-checkResults}" substring="Received disconnect from " casesensitive="no" /> | ||
| 292 : | <contains string="${-checkResults}" substring="Too many authentication failures for" casesensitive="no" /> | ||
| 293 : | <contains string="${-checkResults}" substring="ssh: dashBuild: Name or service not known" casesensitive="no" /> | ||
| 294 : | </or> | ||
| 295 : | nickb | 1.14 | <then> |
| 296 : | nickb | 1.105 | <fail>Error! |
| 297 : | Build cannot connect to ${buildServerUser}: | ||
| 298 : | ---------- | ||
| 299 : | ${-checkresults} | ||
| 300 : | ---------- | ||
| 301 : | Check your ssh keys and ensure you are authorized to connect as ${buildServerUser}. | ||
| 302 : | You can also set a different default value in build.properties for buildServerUser if needed. | ||
| 303 : | |||
| 304 : | </fail> | ||
| 305 : | nickb | 1.14 | </then> |
| 306 : | </if> | ||
| 307 : | nickb | 1.105 | <echo>${-checkResults}</echo> |
| 308 : | <condition property="-foundSignedZip"> | ||
| 309 : | <or> | ||
| 310 : | nickb | 1.1 | <not> |
| 311 : | nickb | 1.105 | <contains string="${-checkResults}" substring="No such file or directory" casesensitive="no" /> |
| 312 : | nickb | 1.1 | </not> |
| 313 : | nickb | 1.105 | <contains string="${-checkResults}" substring="bash: line 0: cd:" casesensitive="no" /> |
| 314 : | </or> | ||
| 315 : | nickb | 1.1 | </condition> |
| 316 : | </target> | ||
| 317 : | |||
| 318 : | nickb | 1.104 | <target name="signMasterZip" if="sign" unless="skipSign"> |
| 319 : | nickb | 1.105 | <antcall target="-timestamp" inheritAll="false" /> |
| 320 : | nickb | 1.33 | <!-- if running as hudson, use simple path in workspace; if running commandline, connect over ssh to remote staging.priv dir --> |
| 321 : | nickb | 1.30 | <if> |
| 322 : | nickb | 1.32 | <or> |
| 323 : | <contains string="${user.name}" substring="hudson" /> | ||
| 324 : | <contains string="${user.home}" substring="hudson" /> | ||
| 325 : | </or> | ||
| 326 : | nickb | 1.30 | <then> |
| 327 : | <property name="buildServerUser" value="" /> | ||
| 328 : | nickb | 1.34 | <property name="signingDir" value="${writableBuildRoot}/signing" /> |
| 329 : | nickb | 1.30 | <mkdir dir="${signingDir}" /> |
| 330 : | </then> | ||
| 331 : | <else> | ||
| 332 : | <!-- user with write perms in staging dir & permission to run /usr/bin/sign --> | ||
| 333 : | <property name="buildServerUser" value="dashBuild@build.eclipse.org" /> | ||
| 334 : | <property name="signingDir" value="/home/data/httpd/download-staging.priv/commonBuild" /> | ||
| 335 : | </else> | ||
| 336 : | </if> | ||
| 337 : | nickb | 1.1 | |
| 338 : | <property name="packtmp" value="${buildDirectory}/packtmp" /> | ||
| 339 : | nickb | 1.15 | <!-- eg., /home/data/httpd/download-staging.priv/commonBuild/I200902091923-out --> |
| 340 : | nickb | 1.30 | <property name="signingDirOutput" value="${signingDir}/${buildId}-out" /> |
| 341 : | <property name="outputFile" value="${signingDirOutput}/${masterZip}" /> | ||
| 342 : | nickb | 1.15 | <!-- valid values are mail|nomail --> |
| 343 : | nickb | 1.1 | <property name="mailStatus" value="nomail" /> |
| 344 : | |||
| 345 : | nickb | 1.12 | |
| 346 : | nickb | 1.105 | <antcall target="-timestamp" inheritAll="false" /> |
| 347 : | nickb | 1.1 | <mkdir dir="${packtmp}" /> |
| 348 : | <move file="${buildDirectory}/${buildLabel}/${masterZip}" tofile="${packtmp}/${masterZip}" /> | ||
| 349 : | <!-- add pack.properties file that specifies effort level --> | ||
| 350 : | nickb | 1.103 | <zip destfile="${packtmp}/${masterZip}" update="true"> |
| 351 : | nickb | 1.104 | <fileset dir="${relengCommonScriptsDir}" includes="pack.properties" /> |
| 352 : | nickb | 1.103 | </zip> |
| 353 : | nickb | 1.10 | |
| 354 : | nickb | 1.32 | <if> |
| 355 : | nickb | 1.33 | <equals arg1="${buildServerUser}" arg2="" /> |
| 356 : | nickb | 1.32 | <then> |
| 357 : | <echo message="Signing ${masterZip} in ${signingDir} on localhost ..." /> | ||
| 358 : | </then> | ||
| 359 : | <else> | ||
| 360 : | <echo message="Signing ${masterZip} as ${buildServerUser} in ${signingDir} ..." /> | ||
| 361 : | </else> | ||
| 362 : | </if> | ||
| 363 : | nickb | 1.1 | |
| 364 : | <!--push drop to staging directory--> | ||
| 365 : | nickb | 1.105 | <antcall target="-timestamp" inheritAll="false" /> |
| 366 : | <echo message="Push ${masterZip} to staging directory" /> | ||
| 367 : | nickb | 1.12 | <if> |
| 368 : | nickb | 1.33 | <equals arg1="${buildServerUser}" arg2="" /> |
| 369 : | nickb | 1.12 | <then> |
| 370 : | nickb | 1.30 | <copy file="${packtmp}/${masterZip}" todir="${signingDir}" /> |
| 371 : | <chmod perm="ugo+rw" file="${signingDir}/${masterZip}" output="${buildDirectory}/signing.txt" append="true" /> | ||
| 372 : | nickb | 1.12 | </then> |
| 373 : | <else> | ||
| 374 : | <exec dir="${packtmp}" executable="scp" output="${buildDirectory}/signing.txt"> | ||
| 375 : | nickb | 1.30 | <arg line="${masterZip} ${buildServerUser}:${signingDir}" /> |
| 376 : | nickb | 1.12 | </exec> |
| 377 : | <exec dir="${buildDirectory}" executable="ssh" output="${buildDirectory}/signing.txt" append="true"> | ||
| 378 : | nickb | 1.30 | <arg line="${buildServerUser} "/bin/chmod ugo+rw ${signingDir}/${masterZip}"" /> |
| 379 : | nickb | 1.12 | </exec> |
| 380 : | </else> | ||
| 381 : | </if> | ||
| 382 : | nickb | 1.105 | |
| 383 : | <property name="signed.zip.check.interval.seconds" value="180" /> | ||
| 384 : | <property name="signed.zip.check.limit" value="15" /> | ||
| 385 : | |||
| 386 : | nickb | 1.1 | <!--invoke sign script and wait--> |
| 387 : | nickb | 1.105 | <antcall target="-timestamp" inheritAll="false" /> |
| 388 : | <echo>Invoke sign script and wait ${signed.zip.check.limit} x ${signed.zip.check.interval.seconds} seconds</echo> | ||
| 389 : | nickb | 1.12 | <if> |
| 390 : | nickb | 1.13 | <and> |
| 391 : | nickb | 1.33 | <equals arg1="${buildServerUser}" arg2="" /> |
| 392 : | nickb | 1.13 | <available file="/usr/bin/sign" type="file" /> |
| 393 : | </and> | ||
| 394 : | nickb | 1.12 | <then> |
| 395 : | nickb | 1.30 | <exec dir="${signingDir}" executable="/usr/bin/sign" output="${buildDirectory}/signing.txt" append="true"> |
| 396 : | <arg line="${signingDir}/${masterZip} ${mailStatus} ${signingDirOutput}" /> | ||
| 397 : | nickb | 1.12 | </exec> |
| 398 : | </then> | ||
| 399 : | <else> | ||
| 400 : | <exec dir="." executable="ssh" output="${buildDirectory}/signing.txt" append="true"> | ||
| 401 : | nickb | 1.30 | <arg line="${buildServerUser} "cd ${signingDir}; /usr/bin/sign ${signingDir}/${masterZip} ${mailStatus} ${signingDirOutput}"" |
| 402 : | nickb | 1.12 | /> |
| 403 : | </exec> | ||
| 404 : | </else> | ||
| 405 : | </if> | ||
| 406 : | nickb | 1.1 | |
| 407 : | nickb | 1.12 | <if> |
| 408 : | nickb | 1.105 | <available file="${buildDirectory}/signing.txt" type="file" /> |
| 409 : | nickb | 1.12 | <then> |
| 410 : | nickb | 1.105 | <loadfile property="signing.log" srcfile="${buildDirectory}/signing.txt" failonerror="false" /> |
| 411 : | <if> | ||
| 412 : | <contains string="${signing.log}" substring="Permission denied" /> | ||
| 413 : | <then> | ||
| 414 : | <echo>Error! | ||
| 415 : | Signing process has returned a Permission denied error: | ||
| 416 : | ---------- | ||
| 417 : | ${signing.log} | ||
| 418 : | ---------- | ||
| 419 : | Please report a bug to webmaster@eclipse.org quoting this message. | ||
| 420 : | |||
| 421 : | </echo> | ||
| 422 : | <antcall target="signMasterZipHasFailed" /> | ||
| 423 : | </then> | ||
| 424 : | <else> | ||
| 425 : | |||
| 426 : | <!-- Wait for signed build to be available --> | ||
| 427 : | <trycatch> | ||
| 428 : | <try> | ||
| 429 : | <retry retrycount="${signed.zip.check.limit}"> | ||
| 430 : | <sequential> | ||
| 431 : | <echo>Sleep for ${signed.zip.check.interval.seconds} seconds...</echo> | ||
| 432 : | <sleep seconds="${signed.zip.check.interval.seconds}" /> | ||
| 433 : | <antcall target="-timestamp" inheritAll="false" /> | ||
| 434 : | <if> | ||
| 435 : | <equals arg1="${buildServerUser}" arg2="" /> | ||
| 436 : | <then> | ||
| 437 : | <antcallback target="checkForSignedZip" return="-foundSignedZip"> | ||
| 438 : | <param name="execline" value="${outputFile}" /> | ||
| 439 : | </antcallback> | ||
| 440 : | </then> | ||
| 441 : | <else> | ||
| 442 : | <antcallback target="checkForSignedZip" return="-foundSignedZip"> | ||
| 443 : | <param name="execline" value="${buildServerUser} "ls ${outputFile}"" /> | ||
| 444 : | </antcallback> | ||
| 445 : | </else> | ||
| 446 : | </if> | ||
| 447 : | <if> | ||
| 448 : | <not> | ||
| 449 : | <isset property="-foundSignedZip" /> | ||
| 450 : | </not> | ||
| 451 : | <then> | ||
| 452 : | <!-- Force the <retry> to loop --> | ||
| 453 : | <fail>Zip unavailable - will try again in ${signed.zip.check.interval.seconds} seconds...</fail> | ||
| 454 : | </then> | ||
| 455 : | </if> | ||
| 456 : | </sequential> | ||
| 457 : | </retry> | ||
| 458 : | </try> | ||
| 459 : | <!-- catch BuildException and throw it away --> | ||
| 460 : | <catch /> | ||
| 461 : | </trycatch> | ||
| 462 : | <if> | ||
| 463 : | <isset property="-foundSignedZip" /> | ||
| 464 : | <then> | ||
| 465 : | <!-- if we got the ${outputFile}, retrieve it via copy or scp, then clean up --> | ||
| 466 : | <if> | ||
| 467 : | <equals arg1="${buildServerUser}" arg2="" /> | ||
| 468 : | <then> | ||
| 469 : | <copy file="${outputFile}" todir="${buildDirectory}/${buildLabel}" /> | ||
| 470 : | <delete includeEmptyDirs="true"> | ||
| 471 : | <fileset dir="${signingDirOutput}" /> | ||
| 472 : | <fileset file="${signingDir}/${masterZip}" /> | ||
| 473 : | </delete> | ||
| 474 : | </then> | ||
| 475 : | <else> | ||
| 476 : | <exec dir="." executable="scp" output="${buildDirectory}/signing.txt" append="true"> | ||
| 477 : | <arg line="${buildServerUser}:${outputFile} ${buildDirectory}/${buildLabel}" /> | ||
| 478 : | </exec> | ||
| 479 : | <exec dir="." executable="ssh" output="${buildDirectory}/signing.txt" append="true"> | ||
| 480 : | <arg line="${buildServerUser} "/bin/rm -rf ${signingDirOutput} ${signingDir}/${masterZip}"" /> | ||
| 481 : | </exec> | ||
| 482 : | </else> | ||
| 483 : | </if> | ||
| 484 : | </then> | ||
| 485 : | <else> | ||
| 486 : | <echo>Warning! | ||
| 487 : | Signed zip check failed after ${signed.zip.check.limit} checks every ${signed.zip.check.interval.seconds} seconds. | ||
| 488 : | Check ${buildDirectory}/signing.txt for any signs of error which might explain this failure. | ||
| 489 : | </echo> | ||
| 490 : | <antcall target="signMasterZipHasFailed" /> | ||
| 491 : | </else> | ||
| 492 : | </if> | ||
| 493 : | |||
| 494 : | </else> | ||
| 495 : | </if> | ||
| 496 : | nickb | 1.12 | </then> |
| 497 : | </if> | ||
| 498 : | nickb | 1.105 | </target> |
| 499 : | nickb | 1.1 | |
| 500 : | nickb | 1.105 | <target name="signMasterZipHasFailed"> |
| 501 : | <echo>Build will proceed w/ unsigned, unprocessed Master zip, ${masterZip}</echo> | ||
| 502 : | <!-- get an unsigned Master zip where we need it --> | ||
| 503 : | <copy file="${packtmp}/${masterZip}" todir="${buildDirectory}/${buildLabel}" /> | ||
| 504 : | <!-- cleanup --> | ||
| 505 : | nickb | 1.12 | <if> |
| 506 : | nickb | 1.33 | <equals arg1="${buildServerUser}" arg2="" /> |
| 507 : | nickb | 1.12 | <then> |
| 508 : | <delete includeEmptyDirs="true"> | ||
| 509 : | nickb | 1.30 | <fileset dir="${signingDirOutput}" /> |
| 510 : | <fileset file="${signingDir}/${masterZip}" /> | ||
| 511 : | nickb | 1.12 | </delete> |
| 512 : | </then> | ||
| 513 : | <else> | ||
| 514 : | <exec dir="." executable="ssh" output="${buildDirectory}/signing.txt" append="true"> | ||
| 515 : | nickb | 1.30 | <arg line="${buildServerUser} "/bin/rm -rf ${signingDirOutput} ${signingDir}/${masterZip}"" /> |
| 516 : | nickb | 1.12 | </exec> |
| 517 : | </else> | ||
| 518 : | </if> | ||
| 519 : | nickb | 1.1 | </target> |
| 520 : | |||
| 521 : | nickb | 1.134 | <target name="get.PACK200_JAVA_HOME"> |
| 522 : | <!-- update location of jvm arguments: use JAVA60_HOME or JAVA50_HOME if running w/ a 1.4 JDK; else use JAVA_HOME --> | ||
| 523 : | <for param="pack200home" | ||
| 524 : | list=" ${JAVA50_HOME}/jre, ${JAVA50_HOME}, ${JAVA60_HOME}/jre, ${JAVA60_HOME}, ${JAVA_HOME}/jre, ${JAVA_HOME}" | ||
| 525 : | delimiter=", " | ||
| 526 : | > | ||
| 527 : | <sequential> | ||
| 528 : | <if> | ||
| 529 : | <or> | ||
| 530 : | <available file="@{pack200home}/bin/pack200" type="file" /> | ||
| 531 : | <available file="@{pack200home}/bin/pack200.exe" type="file" /> | ||
| 532 : | </or> | ||
| 533 : | <then> | ||
| 534 : | <property name="PACK200_JAVA_HOME" value="@{pack200home}" /> | ||
| 535 : | </then> | ||
| 536 : | </if> | ||
| 537 : | </sequential> | ||
| 538 : | </for> | ||
| 539 : | </target> | ||
| 540 : | |||
| 541 : | nickb | 1.1 | <target name="packMasterZip" unless="skipPack"> |
| 542 : | nickb | 1.10 | <if> |
| 543 : | nickb | 1.55 | <os family="windows" /> |
| 544 : | nickb | 1.10 | <then> |
| 545 : | nickb | 1.56 | <echo> |
| 546 : | ** Sorry, pack200 processing is not yet supported on Windows. See http://bugs.eclipse.org/268405 ** | ||
| 547 : | </echo> | ||
| 548 : | nickb | 1.10 | </then> |
| 549 : | nickb | 1.55 | <else> |
| 550 : | <property name="packtmp" value="${buildDirectory}/packtmp" /> | ||
| 551 : | <delete dir="${packtmp}" quiet="true" /> | ||
| 552 : | <mkdir dir="${packtmp}" /> | ||
| 553 : | <move file="${buildDirectory}/${buildLabel}/${masterZip}" tofile="${packtmp}/${masterZip}" /> | ||
| 554 : | |||
| 555 : | <!-- copy pack200 script into ${buildDirectory}/pack200tmp --> | ||
| 556 : | <property name="pack200tmp" value="${buildDirectory}/pack200tmp" /> | ||
| 557 : | <delete dir="${pack200tmp}" quiet="true" /> | ||
| 558 : | <mkdir dir="${pack200tmp}" /> | ||
| 559 : | <copy file="${relengCommonScriptsDir}/pack200" tofile="${pack200tmp}/pack200" /> | ||
| 560 : | nickb | 1.12 | |
| 561 : | nickb | 1.55 | <!-- use default pack.properties if not exist in project's releng --> |
| 562 : | nickb | 1.41 | <if> |
| 563 : | nickb | 1.55 | <not> |
| 564 : | <available file="${pack200tmp}/pack.properties" type="file" /> | ||
| 565 : | </not> | ||
| 566 : | nickb | 1.41 | <then> |
| 567 : | nickb | 1.55 | <copy file="${relengCommonScriptsDir}/pack.properties" todir="${pack200tmp}" /> |
| 568 : | nickb | 1.41 | </then> |
| 569 : | </if> | ||
| 570 : | nickb | 1.1 | |
| 571 : | nickb | 1.134 | <antcallback target="get.PACK200_JAVA_HOME" return="PACK200_JAVA_HOME" /> |
| 572 : | nickb | 1.55 | |
| 573 : | <if> | ||
| 574 : | <and> | ||
| 575 : | <isset property="PACK200_JAVA_HOME" /> | ||
| 576 : | </and> | ||
| 577 : | <then> | ||
| 578 : | nickb | 1.134 | <echo>Pack with ${PACK200_JAVA_HOME}/bin/pack200</echo> |
| 579 : | <replace file="${pack200tmp}/pack200" token="@pack200@" value="${PACK200_JAVA_HOME}/bin/pack200" /> | ||
| 580 : | nickb | 1.55 | <chmod file="${pack200tmp}/pack200" perm="755" /> |
| 581 : | nickb | 1.37 | |
| 582 : | nickb | 1.55 | <!--condition jar if it is not pushed to eclipse.org for signing--> |
| 583 : | <condition property="repack" value="-repack"> | ||
| 584 : | nickb | 1.104 | <or> |
| 585 : | <not> | ||
| 586 : | <isset property="sign" /> | ||
| 587 : | </not> | ||
| 588 : | <isset property="skipSign" /> | ||
| 589 : | </or> | ||
| 590 : | nickb | 1.55 | </condition> |
| 591 : | <property name="repack" value="" /> | ||
| 592 : | nickb | 1.37 | |
| 593 : | nickb | 1.55 | <!--pack200--> |
| 594 : | <java jar="${eclipse.home}/plugins/org.eclipse.equinox.launcher.jar" | ||
| 595 : | fork="true" | ||
| 596 : | timeout="10800000" | ||
| 597 : | jvm="${PACK200_JAVA_HOME}/bin/java" | ||
| 598 : | failonerror="true" | ||
| 599 : | maxmemory="768m" | ||
| 600 : | error="${buildDirectory}/errorlog.txt" | ||
| 601 : | dir="${buildDirectory}" | ||
| 602 : | output="${buildDirectory}/jarprocessorlog.txt" | ||
| 603 : | > | ||
| 604 : | nickb | 1.97 | <jvmarg value="-showversion" /> |
| 605 : | nickb | 1.55 | <jvmarg value="-Dorg.eclipse.update.jarprocessor.pack200=${pack200tmp}" /> |
| 606 : | <arg line="-consolelog -application org.eclipse.update.core.siteOptimizer" /> | ||
| 607 : | <arg line="-jarProcessor -verbose -outputDir ${buildLabel} -processAll -pack ${repack} ${packtmp}/${masterZip}" /> | ||
| 608 : | </java> | ||
| 609 : | nickb | 1.1 | |
| 610 : | nickb | 1.55 | <delete dir="${packtmp}" /> |
| 611 : | <delete dir="${pack200tmp}" /> | ||
| 612 : | </then> | ||
| 613 : | <else> | ||
| 614 : | <echo>Warning! | ||
| 615 : | nickb | 1.58 | Could not find pack200 executable |
| 616 : | nickb | 1.37 | in ${JAVA_HOME}, |
| 617 : | in ${JAVA60_HOME} or | ||
| 618 : | in ${JAVA50_HOME} | ||
| 619 : | nickb | 1.1 | |
| 620 : | nickb | 1.93 | No packed jars (.jar.pack.gz) will be produced for this build. |
| 621 : | </echo> | ||
| 622 : | nickb | 1.55 | </else> |
| 623 : | </if> | ||
| 624 : | nickb | 1.37 | </else> |
| 625 : | </if> | ||
| 626 : | nickb | 1.1 | </target> |
| 627 : | |||
| 628 : | nickb | 1.58 | <!-- generate a p2 repo / update site from Master zip; if packed jars available, use those; if not, use normal jars --> |
| 629 : | nickb | 1.71 | <target name="buildUpdate" description="Generate or reuse site.xml + p2 metadata for update site; package site as archived p2 repo (zip)"> |
| 630 : | nickb | 1.63 | <antcall target="buildMasterZip" /> |
| 631 : | <antcall target="processMasterZip" /> | ||
| 632 : | |||
| 633 : | nickb | 1.58 | <propertyregex property="updateZip" |
| 634 : | input="${masterZip}" | ||
| 635 : | defaultvalue="${masterZip}" | ||
| 636 : | regexp="-Master-" | ||
| 637 : | replace="-Update-" | ||
| 638 : | casesensitive="false" | ||
| 639 : | override="true" | ||
| 640 : | /> | ||
| 641 : | |||
| 642 : | nickb | 1.71 | <!-- because buildZips depends on buildUpdate, we only want to do this once; if the output updateZip already exists, don't redo this step --> |
| 643 : | <if> | ||
| 644 : | <not> | ||
| 645 : | <available file="${buildDirectory}/${buildLabel}/${updateZip}" type="file" /> | ||
| 646 : | </not> | ||
| 647 : | <then> | ||
| 648 : | <property name="p2tmp" value="${buildDirectory}/p2tmp" /> | ||
| 649 : | <mkdir dir="${p2tmp}" /> | ||
| 650 : | <unzip src="${buildDirectory}/${buildLabel}/${masterZip}" dest="${p2tmp}" overwrite="true" /> | ||
| 651 : | nickb | 1.98 | <var name="updateSiteJarDir" value="${p2tmp}/eclipse" /> |
| 652 : | nickb | 1.71 | |
| 653 : | nickb | 1.81 | <!-- [275202] TODO: support injecting other jars into the update site --> |
| 654 : | nickb | 1.82 | |
| 655 : | nickb | 1.71 | <!-- determine if the update site will contain .jar.pack.gz or .jar --> |
| 656 : | <var name="pack200Files" value="" /> | ||
| 657 : | <for param="packedJar"> | ||
| 658 : | <path> | ||
| 659 : | <fileset dir="${updateSiteJarDir}" includes="**/*.jar.pack.gz" /> | ||
| 660 : | </path> | ||
| 661 : | <sequential> | ||
| 662 : | <if> | ||
| 663 : | <available file="@{packedJar}" type="file" /> | ||
| 664 : | <then> | ||
| 665 : | <var name="pack200Files" value="-reusePack200Files" /> | ||
| 666 : | nickb | 1.89 | <!-- https://bugs.eclipse.org/bugs/show_bug.cgi?id=272109#c13 :: remove the plugin jars from the site so they won't be in the metadata |
| 667 : | only problem w/ this approach is that any jars which were NOT packed by an exclusion rule will be deleted w/o a packed counterpart | ||
| 668 : | --> | ||
| 669 : | nickb | 1.90 | <!-- tests failed to run (p2.director install fail) with this change --> |
| 670 : | <!-- <delete dir="${updateSiteJarDir}/plugins" includes="*.jar"/> --> | ||
| 671 : | nickb | 1.71 | </then> |
| 672 : | </if> | ||
| 673 : | </sequential> | ||
| 674 : | </for> | ||
| 675 : | |||
| 676 : | nickb | 1.98 | <!-- allow user-defined category.xml with expandable featureid.version variables --> |
| 677 : | nickb | 1.58 | <if> |
| 678 : | nickb | 1.98 | <available file="${relengBuilderDir}/category.xml" type="file" /> |
| 679 : | nickb | 1.58 | <then> |
| 680 : | nickb | 1.98 | <echo>Using ${relengBuilderDir}/category.xml template for p2 repo / update site categories...</echo> |
| 681 : | <for param="featureJar"> | ||
| 682 : | <path> | ||
| 683 : | <fileset dir="${updateSiteJarDir}/features" includes="*.jar" /> | ||
| 684 : | </path> | ||
| 685 : | <sequential> | ||
| 686 : | <var name="feature.jarfile" unset="true" /> | ||
| 687 : | <var name="feature.id" unset="true" /> | ||
| 688 : | <var name="feature.version" unset="true" /> | ||
| 689 : | <propertyregex property="feature.jarfile" | ||
| 690 : | defaultvalue="@{featureJar}" | ||
| 691 : | input="@{featureJar}" | ||
| 692 : | regexp=".+/features/([^/]+\.jar)" | ||
| 693 : | replace="\1" | ||
| 694 : | override="true" | ||
| 695 : | /> | ||
| 696 : | <propertyregex property="feature.id" | ||
| 697 : | defaultvalue="${feature.jarfile}" | ||
| 698 : | input="${feature.jarfile}" | ||
| 699 : | regexp="([^_]+)_(\d+\.\d+\.\d+\..+)\.jar" | ||
| 700 : | replace="\1" | ||
| 701 : | override="true" | ||
| 702 : | /> | ||
| 703 : | <propertyregex property="feature.version" | ||
| 704 : | defaultvalue="${feature.jarfile}" | ||
| 705 : | input="${feature.jarfile}" | ||
| 706 : | regexp="([^_]+)_(\d+\.\d+\.\d+\..+)\.jar" | ||
| 707 : | replace="\2" | ||
| 708 : | override="true" | ||
| 709 : | /> | ||
| 710 : | <property name="${feature.id}.version" value="${feature.version}" /> | ||
| 711 : | <var name="feature.jarfile" unset="true" /> | ||
| 712 : | <var name="feature.id" unset="true" /> | ||
| 713 : | <var name="feature.version" unset="true" /> | ||
| 714 : | </sequential> | ||
| 715 : | </for> | ||
| 716 : | nickb | 1.71 | <if> |
| 717 : | nickb | 1.98 | <equals arg1="${buildAlias}" arg2="${buildID}" /> |
| 718 : | nickb | 1.71 | <then> |
| 719 : | nickb | 1.98 | <property name="category.name" value="${zipPrefix} ${version} ${buildID}" /> |
| 720 : | nickb | 1.71 | </then> |
| 721 : | nickb | 1.98 | <else> |
| 722 : | <property name="category.name" value="${zipPrefix} ${buildAlias} ${buildID}" /> | ||
| 723 : | </else> | ||
| 724 : | nickb | 1.71 | </if> |
| 725 : | nickb | 1.98 | <loadfile property="site.xml.transformed" srcfile="${relengBuilderDir}/category.xml"> |
| 726 : | <filterchain> | ||
| 727 : | <expandproperties /> | ||
| 728 : | </filterchain> | ||
| 729 : | </loadfile> | ||
| 730 : | <echo file="${updateSiteJarDir}/site.xml" message="${site.xml.transformed}" /> | ||
| 731 : | nickb | 1.58 | </then> |
| 732 : | nickb | 1.71 | <else> |
| 733 : | <antcall target="buildSiteXml" /> | ||
| 734 : | </else> | ||
| 735 : | nickb | 1.58 | </if> |
| 736 : | |||
| 737 : | nickb | 1.98 | <!-- use unpacked features due to bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=269199, 273519 --> |
| 738 : | <copy todir="${buildDirectory}/${buildLabel}/${updateZip}_tmp"> | ||
| 739 : | <fileset dir="${updateSiteJarDir}" includes="features/*.jar, site.xml" /> | ||
| 740 : | </copy> | ||
| 741 : | nickb | 1.97 | <for param="jarfile"> |
| 742 : | <path> | ||
| 743 : | <fileset dir="${updateSiteJarDir}" includes="plugins/*.jar" /> | ||
| 744 : | </path> | ||
| 745 : | <sequential> | ||
| 746 : | <var name="jarname" unset="true" /> | ||
| 747 : | <basename property="jarname" file="@{jarfile}" /> | ||
| 748 : | <if> | ||
| 749 : | <!-- add the jar.pack.gz if it exists; otherwise add the unpacked jar --> | ||
| 750 : | <available file="@{jarfile}.pack.gz" type="file" /> | ||
| 751 : | <then> | ||
| 752 : | nickb | 1.98 | <copy todir="${buildDirectory}/${buildLabel}/${updateZip}_tmp"> |
| 753 : | nickb | 1.97 | <fileset dir="${updateSiteJarDir}" includes="plugins/${jarname}.pack.gz" /> |
| 754 : | nickb | 1.98 | </copy> |
| 755 : | nickb | 1.97 | </then> |
| 756 : | <else> | ||
| 757 : | nickb | 1.98 | <copy todir="${buildDirectory}/${buildLabel}/${updateZip}_tmp"> |
| 758 : | nickb | 1.97 | <fileset dir="${updateSiteJarDir}" includes="plugins/${jarname}" /> |
| 759 : | nickb | 1.98 | </copy> |
| 760 : | nickb | 1.97 | </else> |
| 761 : | </if> | ||
| 762 : | </sequential> | ||
| 763 : | </for> | ||
| 764 : | nickb | 1.98 | |
| 765 : | <antcall target="p2.meta"> | ||
| 766 : | <param name="updateSiteDir" value="${updateSiteJarDir}" /> | ||
| 767 : | </antcall> | ||
| 768 : | |||
| 769 : | <zip destfile="${buildDirectory}/${buildLabel}/${updateZip}" update="true"> | ||
| 770 : | <fileset dir="${buildDirectory}/${buildLabel}/${updateZip}_tmp" includes="features/*.jar, plugins/*.jar*, site.xml" /> | ||
| 771 : | <fileset dir="${updateSiteJarDir}" includes="artifacts.jar, content.jar" /> | ||
| 772 : | </zip> | ||
| 773 : | |||
| 774 : | <delete dir="${buildDirectory}/${buildLabel}/${updateZip}_tmp" quiet="true" /> | ||
| 775 : | nickb | 1.61 | </then> |
| 776 : | nickb | 1.58 | </if> |
| 777 : | </target> | ||
| 778 : | |||
| 779 : | nickb | 1.88 | <target name="p2.meta" description="Generate p2 metadata for a folder w/ site.xml and features/ plugins/"> |
| 780 : | nickb | 1.98 | <!-- must be set when calling this task--> |
| 781 : | <property name="updateSiteDir" value="" /> | ||
| 782 : | |||
| 783 : | nickb | 1.88 | <!-- debugging |
| 784 : | <echoproperties format="text" destfile="${updateSiteJarDir}/echoproperties.txt" /> | ||
| 785 : | <exec executable="/usr/bin/find" | ||
| 786 : | failifexecutionfails="false" | ||
| 787 : | append="true" | ||
| 788 : | output="${updateSiteJarDir}/find.all.files.txt" | ||
| 789 : | dir="${updateSiteJarDir}" | ||
| 790 : | error="${updateSiteJarDir}/find.all.files.txt" | ||
| 791 : | /> | ||
| 792 : | debugging --> | ||
| 793 : | nickb | 1.134 | |
| 794 : | <antcallback target="get.PACK200_JAVA_HOME" return="PACK200_JAVA_HOME" /> | ||
| 795 : | nickb | 1.88 | <for param="launcherjar"> |
| 796 : | <path> | ||
| 797 : | <fileset dir="${relengBaseBuilderDir}/plugins" includes="org.eclipse.equinox.launcher_*.jar" /> | ||
| 798 : | </path> | ||
| 799 : | <sequential> | ||
| 800 : | <!-- See http://wiki.eclipse.org/Equinox_p2_Metadata_Generator --> | ||
| 801 : | nickb | 1.134 | <echo>Run p2 metadata generator with ${PACK200_JAVA_HOME}</echo> |
| 802 : | nickb | 1.88 | <java jar="@{launcherjar}" |
| 803 : | fork="true" | ||
| 804 : | timeout="10800000" | ||
| 805 : | nickb | 1.134 | jvm="${PACK200_JAVA_HOME}/bin/java" |
| 806 : | nickb | 1.88 | failonerror="false" |
| 807 : | maxmemory="256m" | ||
| 808 : | taskname="p2.meta" | ||
| 809 : | > | ||
| 810 : | <classpath> | ||
| 811 : | <fileset dir="${relengBaseBuilderDir}/plugins" includes="org.eclipse.equinox.launcher_*.jar" /> | ||
| 812 : | <pathelement location="${relengBaseBuilderDir}/plugins" /> | ||
| 813 : | </classpath> | ||
| 814 : | <arg line=" org.eclipse.equinox.launcher.Main -application org.eclipse.equinox.p2.metadata.generator.EclipseGenerator" /> | ||
| 815 : | nickb | 1.98 | <arg line=" -updateSite ${updateSiteDir}/ -site file:${updateSiteDir}/site.xml" /> |
| 816 : | <arg line=" -metadataRepository file:${updateSiteDir}/ -metadataRepositoryName "${projectid} Update Site"" /> | ||
| 817 : | <arg line=" -artifactRepository file:${updateSiteDir}/ -artifactRepositoryName "${projectid} Artifacts"" /> | ||
| 818 : | nickb | 1.88 | <arg line=" -compress -noDefaultIUs -reusePack200Files" /> |
| 819 : | </java> | ||
| 820 : | </sequential> | ||
| 821 : | </for> | ||
| 822 : | </target> | ||
| 823 : | |||
| 824 : | nickb | 1.58 | <target name="buildSiteXml" description="Generate a site.xml to contain the features in a category"> |
| 825 : | <!-- TODO: given a list of features, produce site.xml so they're contained in a default category (or, fix bug 269226 so we don't need this) --> | ||
| 826 : | <!-- TODO: support <site mirrorsURL="" associatedSites="" etc.> ? --> | ||
| 827 : | nickb | 1.61 | <echo>Generating site.xml for use with p2 repo / update site categories...</echo> |
| 828 : | nickb | 1.58 | <echo file="${updateSiteJarDir}/site.xml"><?xml version="1.0" encoding="UTF-8"?></echo> |
| 829 : | <if> | ||
| 830 : | <equals arg1="${pack200Files}" arg2="-reusePack200Files" /> | ||
| 831 : | <then> | ||
| 832 : | <echo append="true" file="${updateSiteJarDir}/site.xml"><site pack200="true"></echo> | ||
| 833 : | </then> | ||
| 834 : | <else> | ||
| 835 : | <echo append="true" file="${updateSiteJarDir}/site.xml"><site></echo> | ||
| 836 : | </else> | ||
| 837 : | </if> | ||
| 838 : | |||
| 839 : | <if> | ||
| 840 : | nickb | 1.126 | <or> |
| 841 : | <equals arg1="${buildAlias}" arg2="${buildID}" /> | ||
| 842 : | <contains string="${buildAlias}" substring="-SNAPSHOT" /> | ||
| 843 : | </or> | ||
| 844 : | nickb | 1.58 | <then> |
| 845 : | nickb | 1.98 | <property name="category.name" value="${zipPrefix} ${version} ${buildID}" /> |
| 846 : | nickb | 1.58 | </then> |
| 847 : | <else> | ||
| 848 : | nickb | 1.98 | <property name="category.name" value="${zipPrefix} ${buildAlias} ${buildID}" /> |
| 849 : | nickb | 1.58 | </else> |
| 850 : | </if> | ||
| 851 : | |||
| 852 : | <echo append="true" file="${updateSiteJarDir}/site.xml"> <description>To install these features, point Eclipse at this site.</description> | ||
| 853 : | |||
| 854 : | <!-- ${category.name} --> | ||
| 855 : | <category-def label="${category.name}" name="${category.name}"> | ||
| 856 : | <description>${category.name}: contains all features in this build.</description> | ||
| 857 : | </category-def> | ||
| 858 : | </echo> | ||
| 859 : | |||
| 860 : | <for param="featureJar"> | ||
| 861 : | <path> | ||
| 862 : | <fileset dir="${updateSiteJarDir}/features" includes="*.jar" /> | ||
| 863 : | </path> | ||
| 864 : | <sequential> | ||
| 865 : | <var name="feature.jarfile" unset="true" /> | ||
| 866 : | <var name="feature.id" unset="true" /> | ||
| 867 : | <var name="feature.version" unset="true" /> | ||
| 868 : | <propertyregex property="feature.jarfile" | ||
| 869 : | defaultvalue="@{featureJar}" | ||
| 870 : | input="@{featureJar}" | ||
| 871 : | regexp=".+/features/([^/]+\.jar)" | ||
| 872 : | replace="\1" | ||
| 873 : | override="true" | ||
| 874 : | /> | ||
| 875 : | <propertyregex property="feature.id" | ||
| 876 : | defaultvalue="${feature.jarfile}" | ||
| 877 : | input="${feature.jarfile}" | ||
| 878 : | regexp="([^_]+)_(\d+\.\d+\.\d+\..+)\.jar" | ||
| 879 : | replace="\1" | ||
| 880 : | override="true" | ||
| 881 : | /> | ||
| 882 : | <propertyregex property="feature.version" | ||
| 883 : | defaultvalue="${feature.jarfile}" | ||
| 884 : | input="${feature.jarfile}" | ||
| 885 : | regexp="([^_]+)_(\d+\.\d+\.\d+\..+)\.jar" | ||
| 886 : | replace="\2" | ||
| 887 : | override="true" | ||
| 888 : | /> | ||
| 889 : | <echo append="true" file="${updateSiteJarDir}/site.xml"> <feature id="${feature.id}" version="${feature.version}" url="features/${feature.jarfile}" patch="false"> | ||
| 890 : | <category name="${category.name}"/> | ||
| 891 : | nickb | 1.61 | </feature> |
| 892 : | </echo> | ||
| 893 : | nickb | 1.58 | <var name="feature.jarfile" unset="true" /> |
| 894 : | <var name="feature.id" unset="true" /> | ||
| 895 : | <var name="feature.version" unset="true" /> | ||
| 896 : | </sequential> | ||
| 897 : | </for> | ||
| 898 : | <echo append="true" file="${updateSiteJarDir}/site.xml"> | ||
| 899 : | </site> | ||
| 900 : | </echo> | ||
| 901 : | </target> | ||
| 902 : | |||
| 903 : | nickb | 1.63 | <target name="buildMasterZip" description="only do this step if there's no Master zip already created; called by buildZips and buildUpdate"> |
| 904 : | <if> | ||
| 905 : | <not> | ||
| 906 : | <available file="${buildDirectory}/${buildLabel}/${masterZip}" type="file" /> | ||
| 907 : | </not> | ||
| 908 : | <then> | ||
| 909 : | <antcall target="-timestamp" inheritall="false" /> | ||
| 910 : | |||
| 911 : | <!-- build Master Zip using "outputUpdateJars=true" in build.properties so we get ONLY jars, not mix of folders & jars --> | ||
| 912 : | <ant antfile="${relengCommonBuilderDir}/build.xml" target="main"> | ||
| 913 : | <property name="component" value="builder/all" /> | ||
| 914 : | </ant> | ||
| 915 : | |||
| 916 : | <antcall target="-timestamp" inheritall="false" /> | ||
| 917 : | |||
| 918 : | nickb | 1.105 | <echo>Signing control properties: |
| 919 : | sign = ${sign} | ||
| 920 : | skipSign = ${skipSign} | ||
| 921 : | domainNamespace = ${domainNamespace}</echo> | ||
| 922 : | nickb | 1.63 | <antcall target="signMasterZip"> |
| 923 : | <param name="mailStatus" value="nomail" /> | ||
| 924 : | </antcall> | ||
| 925 : | |||
| 926 : | <!-- Unpack jars to ALL zip with mix of folders & jars --> | ||
| 927 : | <antcall target="unpackUpdateJarsAndRepack"> | ||
| 928 : | <param name="sourceZip" value="${buildDirectory}/${buildLabel}/${masterZip}" /> | ||
| 929 : | <param name="targetZip" value="${buildDirectory}/${buildLabel}/${allZip}" /> | ||
| 930 : | </antcall> | ||
| 931 : | </then> | ||
| 932 : | </if> | ||
| 933 : | </target> | ||
| 934 : | |||
| 935 : | <target name="processMasterZip" description="only do this step once"> | ||
| 936 : | <if> | ||
| 937 : | <not> | ||
| 938 : | <available file="${buildDirectory}/processMasterZip.done" type="file" /> | ||
| 939 : | </not> | ||
| 940 : | <then> | ||
| 941 : | nickb | 1.68 | <antcall target="-timestamp" inheritall="false" /> |
| 942 : | nickb | 1.71 | |
| 943 : | nickb | 1.63 | <!-- pack the master zip: to skip this step, set skipPack=true in your .releng/build.properties --> |
| 944 : | <antcall target="packMasterZip" /> | ||
| 945 : | |||
| 946 : | <antcall target="-timestamp" inheritall="false" /> | ||
| 947 : | <echo file="${buildDirectory}/processMasterZip.done" message="processMasterZip.done=true" /> | ||
| 948 : | </then> | ||
| 949 : | </if> | ||
| 950 : | </target> | ||
| 951 : | |||
| 952 : | nickb | 1.71 | <!-- [248509, 271851] use p2 publisher to create SDKs once it's ready & documented --> |
| 953 : | <target name="run.publisher"> | ||
| 954 : | </target> | ||
| 955 : | |||
| 956 : | nickb | 1.84 | <!-- Required properties are: |
| 957 : | p2.director.installIU [csv list], p2.director.input.repo [csv list], and p2.director.destination [directory] | ||
| 958 : | Optional properties are: | ||
| 959 : | p2.director.bundlepool, p2.director.extraArgs | ||
| 960 : | --> | ||
| 961 : | <!-- | ||
| 962 : | TODO: install from update site zips: need to fetch them, unzip them, install from them, and clean up | ||
| 963 : | repositoryURLs=\ | ||
| 964 : | http://www.eclipse.org/modeling/download.php?r=1&file=/modeling/emf/emf/downloads/drops/2.4.2/R200902171115/emf-sdo-xsd-Update-2.4.2.zip,\ | ||
| 965 : | http://www.eclipse.org/gef/download.php?r=1&file=/tools/gef/downloads/drops/3.4.2/R200902171642/GEF-Update-3.4.2.zip | ||
| 966 : | featureIDsToInstall=org.eclipse.emf,org.eclipse.gef | ||
| 967 : | --> | ||
| 968 : | <target name="run.director" description="install from p2 repos"> | ||
| 969 : | nickb | 1.111 | <!-- installType = feature or plugin --> |
| 970 : | <property name="p2.director.installType" value="feature" /> | ||
| 971 : | nickb | 1.84 | <property name="p2.director.installIU" value="${mainFeatureToBuildID}" /> |
| 972 : | nickb | 1.134 | <property name="p2.director.input.repo" value="jar:file:${buildDirectory}/${buildLabel}/${updateZip}!/" /> |
| 973 : | nickb | 1.84 | <property name="p2.director.destination" value="${install}/eclipse" /> |
| 974 : | <property name="p2.director.bundlepool" value="${p2.director.destination}" /> | ||
| 975 : | nickb | 1.134 | <!-- Eclipse 3.4: use deprecated org.eclipse.equinox.p2.director.app.application; |
| 976 : | Eclipse 3.5 (osgi.framework.version=3.5+): use org.eclipse.equinox.p2.director to allow installing multiple IUs in a single operation --> | ||
| 977 : | <if> | ||
| 978 : | <contains string="${osgi.framework.version}" substring="3.4." /> | ||
| 979 : | <then> | ||
| 980 : | <echo>Using deprecated Eclipse 3.4 org.eclipse.equinox.p2.director.app.application</echo> | ||
| 981 : | <property name="p2.director.application" value="org.eclipse.equinox.p2.director.app.application" /> | ||
| 982 : | </then> | ||
| 983 : | <else> | ||
| 984 : | <property name="p2.director.application" value="org.eclipse.equinox.p2.director" /> | ||
| 985 : | </else> | ||
| 986 : | </if> | ||
| 987 : | |||
| 988 : | nickb | 1.72 | <!-- could pass in args such as '-p2.os linux -p2.ws gtk -p2.arch x86' --> |
| 989 : | nickb | 1.71 | <property name="p2.director.extraArgs" value="" /> |
| 990 : | nickb | 1.134 | <!-- to avoid using mirrors when fetching, use -Declipse.p2.mirrors=false --> |
| 991 : | <property name="p2.director.extraVmArgs" value="" /> | ||
| 992 : | nickb | 1.88 | |
| 993 : | <!-- verify that the URLs are valid - for zips, need to fetch them & unzip them, then clean up after --> | ||
| 994 : | <property name="p2repoZipsTmp" value="${buildDirectory}/p2repoZipsTmp" /> | ||
| 995 : | <mkdir dir="${p2repoZipsTmp}" /> | ||
| 996 : | <var name="p2.director.input.repo.cleaned" value="" /> | ||
| 997 : | <for param="repoURL" delimiter=", " list="${p2.director.input.repo}"> | ||
| 998 : | <sequential> | ||
| 999 : | <if> | ||
| 1000 : | nickb | 1.134 | <!-- prefetch remote repo zips and treat them as local repos --> |
| 1001 : | nickb | 1.88 | <and> |
| 1002 : | <contains string="@{repoURL}" substring=".zip" /> | ||
| 1003 : | <or> | ||
| 1004 : | <contains string="@{repoURL}" substring="http://" /> | ||
| 1005 : | <contains string="@{repoURL}" substring="https://" /> | ||
| 1006 : | <contains string="@{repoURL}" substring="ftp://" /> | ||
| 1007 : | </or> | ||
| 1008 : | </and> | ||
| 1009 : | <then> | ||
| 1010 : | <propertyregex property="repoFile" | ||
| 1011 : | input="@{repoURL}" | ||
| 1012 : | defaultvalue="@{repoURL}" | ||
| 1013 : | regexp=".+/([^/]+.zip)" | ||
| 1014 : | replace="\1" | ||
| 1015 : | casesensitive="false" | ||
| 1016 : | override="true" | ||
| 1017 : | /> | ||
| 1018 : | <ant target="getDep" antfile="${relengCommonBuilderDir}/tools/scripts/getDependencies.xml"> | ||
| 1019 : | <property name="url" value="@{repoURL}" /> | ||
| 1020 : | <property name="file" value="${repoFile}" /> | ||
| 1021 : | <property name="unpackDest" value="${p2repoZipsTmp}/${repoFile}_" /> | ||
| 1022 : | </ant> | ||
| 1023 : | <if> | ||
| 1024 : | <not> | ||
| 1025 : | <and> | ||
| 1026 : | <or> | ||
| 1027 : | <available file="${p2repoZipsTmp}/${repoFile}_/artifacts.jar" type="file" /> | ||
| 1028 : | <available file="${p2repoZipsTmp}/${repoFile}_/artifacts.xml" type="file" /> | ||
| 1029 : | </or> | ||
| 1030 : | <or> | ||
| 1031 : | <available file="${p2repoZipsTmp}/${repoFile}_/content.jar" type="file" /> | ||
| 1032 : | <available file="${p2repoZipsTmp}/${repoFile}_/content.xml" type="file" /> | ||
| 1033 : | </or> | ||
| 1034 : | </and> | ||
| 1035 : | </not> | ||
| 1036 : | <then> | ||
| 1037 : | <if> | ||
| 1038 : | <available file="${p2repoZipsTmp}/${repoFile}_/site.xml" type="file" /> | ||
| 1039 : | <then> | ||
| 1040 : | <echo>Generating metadata for this update site</echo> | ||
| 1041 : | <antcall target="p2.meta"> | ||
| 1042 : | nickb | 1.98 | <param name="updateSiteDir" value="${p2repoZipsTmp}/${repoFile}_" /> |
| 1043 : | nickb | 1.88 | <param name="projectid" value="${repoFile}" /> |
| 1044 : | </antcall> | ||
| 1045 : | </then> | ||
| 1046 : | <else> | ||
| 1047 : | <fail>Update site in ${repoFile} contains no site.xml and no p2 metadata. Cannot proceed.</fail> | ||
| 1048 : | </else> | ||
| 1049 : | </if> | ||
| 1050 : | </then> | ||
| 1051 : | </if> | ||
| 1052 : | nickb | 1.128 | <zip destfile="${p2repoZipsTmp}/${repoFile}" update="false" basedir="${p2repoZipsTmp}/${repoFile}_" /> |
| 1053 : | <delete dir="${p2repoZipsTmp}/${repoFile}_" includeemptydirs="true" quiet="true" /> | ||
| 1054 : | <var name="p2.director.input.repo.cleaned" | ||
| 1055 : | value="${p2.director.input.repo.cleaned},jar:file:${p2repoZipsTmp}/${repoFile}!/" | ||
| 1056 : | /> | ||
| 1057 : | nickb | 1.88 | </then> |
| 1058 : | <elseif> | ||
| 1059 : | <or> | ||
| 1060 : | <contains string="@{repoURL}" substring="http://" /> | ||
| 1061 : | <contains string="@{repoURL}" substring="https://" /> | ||
| 1062 : | <contains string="@{repoURL}" substring="ftp://" /> | ||
| 1063 : | nickb | 1.134 | <contains string="@{repoURL}" substring="file:" /> |
| 1064 : | nickb | 1.88 | </or> |
| 1065 : | <then> | ||
| 1066 : | <var name="p2.director.input.repo.cleaned" value="${p2.director.input.repo.cleaned},@{repoURL}" /> | ||
| 1067 : | </then> | ||
| 1068 : | </elseif> | ||
| 1069 : | <else> | ||
| 1070 : | <var name="p2.director.input.repo.cleaned" value="${p2.director.input.repo.cleaned},file:@{repoURL}" /> | ||
| 1071 : | </else> | ||
| 1072 : | </if> | ||
| 1073 : | </sequential> | ||
| 1074 : | </for> | ||
| 1075 : | <!-- trim prefix "," --> | ||
| 1076 : | <propertyregex property="p2.director.input.repo.cleaned" | ||
| 1077 : | input="${p2.director.input.repo.cleaned}" | ||
| 1078 : | defaultvalue="${p2.director.input.repo.cleaned}" | ||
| 1079 : | regexp=",(.+)" | ||
| 1080 : | replace="\1" | ||
| 1081 : | override="true" | ||
| 1082 : | /> | ||
| 1083 : | nickb | 1.72 | <mkdir dir="${p2.director.bundlepool}" /> |
| 1084 : | nickb | 1.71 | <!-- See http://wiki.eclipse.org/Equinox_p2_director_application/Examples/Install_into_eclipse_using_SDKProfile --> |
| 1085 : | nickb | 1.111 | <if> |
| 1086 : | <equals arg1="${p2.director.installType}" arg2="feature" /> | ||
| 1087 : | <then> | ||
| 1088 : | nickb | 1.134 | <property name="p2.director.installIU.cmd" value="-installIU ${p2.director.installIU}.feature.group" /> |
| 1089 : | nickb | 1.111 | </then> |
| 1090 : | <else> | ||
| 1091 : | nickb | 1.134 | <property name="p2.director.installIU.cmd" value="-installIU ${p2.director.installIU}" /> |
| 1092 : | nickb | 1.111 | </else> |
| 1093 : | </if> | ||
| 1094 : | |||
| 1095 : | nickb | 1.134 | <antcallback target="get.PACK200_JAVA_HOME" return="PACK200_JAVA_HOME" /> |
| 1096 : | |||
| 1097 : | <!-- find launcher jar: if eclipse unpacked from SDK zip, use that launcher; if not available, fall back to basebuilder's launcher --> | ||
| 1098 : | <mkdir dir="${p2.director.destination}/plugins" /> | ||
| 1099 : | <for param="launcherjar"> | ||
| 1100 : | <path> | ||
| 1101 : | <fileset dir="${relengBaseBuilderDir}/plugins" includes="org.eclipse.equinox.launcher_*.jar" /> | ||
| 1102 : | <fileset dir="${p2.director.destination}/plugins" includes="org.eclipse.equinox.launcher_*.jar" /> | ||
| 1103 : | </path> | ||
| 1104 : | <sequential> | ||
| 1105 : | <if> | ||
| 1106 : | <available file="@{launcherjar}" type="file" /> | ||
| 1107 : | <then> | ||
| 1108 : | <var name="p2.director.launcher.jar" value="@{launcherjar}" /> | ||
| 1109 : | <var name="p2.director.launcher.jar.dir" unset="true" /> | ||
| 1110 : | <dirname property="p2.director.launcher.jar.dir" file="@{launcherjar}" /> | ||
| 1111 : | </then> | ||
| 1112 : | </if> | ||
| 1113 : | </sequential> | ||
| 1114 : | </for> | ||
| 1115 : | |||
| 1116 : | <!-- collect all available pre-existing repos for on-disk reuse --> | ||
| 1117 : | <var name="p2.director.metadataRepository" value="" /> | ||
| 1118 : | <var name="p2.director.artifactRepository" value="" /> | ||
| 1119 : | <!-- ${install}/eclipse, --> | ||
| 1120 : | <for param="sourcedir" list="${p2.director.destination}, ${relengBaseBuilderDir}, ${buildDirectory}" delimiter=", "> | ||
| 1121 : | <sequential> | ||
| 1122 : | <if> | ||
| 1123 : | <and> | ||
| 1124 : | <not> | ||
| 1125 : | <contains string="${p2.director.input.repo.cleaned}" | ||
| 1126 : | substring="@{sourcedir}/p2/org.eclipse.equinox.p2.engine/profileRegistry/SDKProfile.profile" | ||
| 1127 : | /> | ||
| 1128 : | </not> | ||
| 1129 : | <not> | ||
| 1130 : | <contains string="${p2.director.metadataRepository}" | ||
| 1131 : | substring="@{sourcedir}/p2/org.eclipse.equinox.p2.engine/profileRegistry/SDKProfile.profile" | ||
| 1132 : | /> | ||
| 1133 : | </not> | ||
| 1134 : | <available file="@{sourcedir}/p2/org.eclipse.equinox.p2.engine/profileRegistry/SDKProfile.profile" type="dir" /> | ||
| 1135 : | </and> | ||
| 1136 : | <then> | ||
| 1137 : | <var name="p2.director.metadataRepository" | ||
| 1138 : | value="${p2.director.metadataRepository},file:@{sourcedir}/p2/org.eclipse.equinox.p2.engine/profileRegistry/SDKProfile.profile" | ||
| 1139 : | /> | ||
| 1140 : | </then> | ||
| 1141 : | </if> | ||
| 1142 : | <if> | ||
| 1143 : | <and> | ||
| 1144 : | <not> | ||
| 1145 : | <contains string="${p2.director.input.repo.cleaned}" substring="@{sourcedir}" /> | ||
| 1146 : | </not> | ||
| 1147 : | <not> | ||
| 1148 : | <contains string="${p2.director.artifactRepository}" substring="@{sourcedir}" /> | ||
| 1149 : | </not> | ||
| 1150 : | <or> | ||
| 1151 : | <available file="@{sourcedir}/artifacts.xml" type="dir" /> | ||
| 1152 : | <available file="@{sourcedir}/artifacts.jar" type="dir" /> | ||
| 1153 : | </or> | ||
| 1154 : | </and> | ||
| 1155 : | <then> | ||
| 1156 : | <var name="p2.director.artifactRepository" value="${p2.director.artifactRepository},file:@{sourcedir}" /> | ||
| 1157 : | </then> | ||
| 1158 : | </if> | ||
| 1159 : | </sequential> | ||
| 1160 : | </for> | ||
| 1161 : | <!-- trim prefix "," --> | ||
| 1162 : | <propertyregex property="p2.director.artifactRepository" | ||
| 1163 : | defaultvalue="${p2.director.artifactRepository}" | ||
| 1164 : | input="${p2.director.artifactRepository}" | ||
| 1165 : | regexp=",(.+)" | ||
| 1166 : | replace="\1" | ||
| 1167 : | override="true" | ||
| 1168 : | /> | ||
| 1169 : | <propertyregex property="p2.director.metadataRepository" | ||
| 1170 : | defaultvalue="${p2.director.metadataRepository}" | ||
| 1171 : | input="${p2.director.metadataRepository}" | ||
| 1172 : | regexp=",(.+)" | ||
| 1173 : | replace="\1" | ||
| 1174 : | override="true" | ||
| 1175 : | /> | ||
| 1176 : | |||
| 1177 : | <!-- | ||
| 1178 : | p2.director.application = ${p2.director.application} | ||
| 1179 : | p2.director.installIU.cmd = ${p2.director.installIU.cmd} | ||
| 1180 : | p2.director.launcher.jar = ${p2.director.launcher.jar} | ||
| 1181 : | p2.director.launcher.jar.dir = ${p2.director.launcher.jar.dir} | ||
| 1182 : | p2.director.metadataRepository = ${p2.director.metadataRepository} | ||
| 1183 : | p2.director.artifactRepository = ${p2.director.artifactRepository} | ||
| 1184 : | --> | ||
| 1185 : | <echo> | ||
| 1186 : | p2.director.input.repo.cleaned = ${p2.director.input.repo.cleaned} | ||
| 1187 : | p2.director.destination = ${p2.director.destination} | ||
| 1188 : | |||
| 1189 : | </echo> | ||
| 1190 : | |||
| 1191 : | <java jar="${p2.director.launcher.jar}" | ||
| 1192 : | fork="true" | ||
| 1193 : | timeout="900000" | ||
| 1194 : | jvm="${PACK200_JAVA_HOME}/bin/java" | ||
| 1195 : | failonerror="true" | ||
| 1196 : | maxmemory="256m" | ||
| 1197 : | taskname="p2.dir" | ||
| 1198 : | > | ||
| 1199 : | <classpath> | ||
| 1200 : | <fileset dir="${p2.director.launcher.jar.dir}" includes="org.eclipse.equinox.launcher_*.jar" /> | ||
| 1201 : | <pathelement location="${p2.director.launcher.jar.dir}" /> | ||
| 1202 : | </classpath> | ||
| 1203 : | nickb | 1.84 | <arg line=" -application ${p2.director.application}" /> |
| 1204 : | nickb | 1.134 | <arg line=" -nosplash -consoleLog" /> |
| 1205 : | <arg line=" -flavor tooling -roaming -profile SDKProfile ${p2.director.installIU.cmd}" /> | ||
| 1206 : | nickb | 1.72 | <arg line=" -destination ${p2.director.destination} -bundlepool ${p2.director.bundlepool}" /> |
| 1207 : | nickb | 1.134 | <arg line=" -metadataRepository ${p2.director.input.repo.cleaned},${p2.director.metadataRepository}" /> |
| 1208 : | <arg line=" -artifactRepository ${p2.director.input.repo.cleaned},${p2.director.artifactRepository}" /> | ||
| 1209 : | nickb | 1.71 | <arg line=" -profileProperties org.eclipse.update.install.features=true" /> |
| 1210 : | nickb | 1.72 | <arg line=" ${p2.director.extraArgs}" /> |
| 1211 : | <arg line=" -vmargs -Declipse.p2.data.area=${p2.director.destination}/p2 -Declipse.p2.MD5Check=false" /> | ||
| 1212 : | nickb | 1.134 | <arg line=" ${p2.director.extraVmArgs}" /> |
| 1213 : | </java> | ||
| 1214 : | nickb | 1.88 | |
| 1215 : | <!-- cleanup temp dir --> | ||
| 1216 : | <delete dir="${p2repoZipsTmp}" /> | ||
| 1217 : | |||
| 1218 : | nickb | 1.71 | </target> |
| 1219 : | |||
| 1220 : | <target name="buildZips" depends="buildUpdate"> | ||
| 1221 : | nickb | 1.63 | <antcall target="buildMasterZip" /> |
| 1222 : | |||
| 1223 : | <antcall target="-timestamp" inheritall="false" /> | ||
| 1224 : | |||
| 1225 : | nickb | 1.71 | <property name="ziptmp" value="${buildDirectory}/ziptmp" /> |
| 1226 : | |||
| 1227 : | nickb | 1.63 | <!-- build SDK --> |
| 1228 : | <zip destfile="${buildDirectory}/${buildLabel}/${SDKZip}" update="true"> | ||
| 1229 : | <zipfileset src="${buildDirectory}/${buildLabel}/${allZip}" | ||
| 1230 : | dirmode="775" | ||
| 1231 : | filemode="664" | ||
| 1232 : | nickb | 1.110 | excludes="**/*.pack.gz, **/pack.properties, **/features/*.jar, **/${domainNamespace}.*.all*, **/${domainNamespace}.*.all*/**" |
| 1233 : | nickb | 1.63 | /> |
| 1234 : | </zip> | ||
| 1235 : | nickb | 1.71 | |
| 1236 : | nickb | 1.63 | <!-- build runtime from SDK --> |
| 1237 : | <zip destfile="${buildDirectory}/${buildLabel}/${zipPrefix}-runtime${incubation}-${buildAlias}.zip" update="true"> | ||
| 1238 : | <zipfileset src="${buildDirectory}/${buildLabel}/${SDKZip}" | ||
| 1239 : | dirmode="775" | ||
| 1240 : | filemode="664" | ||
| 1241 : | nickb | 1.76 | excludes="**/${domainNamespace}.*.examples*, **/${domainNamespace}.*.examples*/**, **/${domainNamespace}.*.sdk*, **/${domainNamespace}.*.sdk*/**, **/${domainNamespace}.*.all*, **/${domainNamespace}.*.all*/**, **/${domainNamespace}.*.doc*, **/${domainNamespace}.*.doc*/**, **/${domainNamespace}.*.source*, **/${domainNamespace}.*.source*/**, **/*src.zip" |
| 1242 : | nickb | 1.63 | > |
| 1243 : | nickb | 1.76 | <include name="**/${projNamespace}*" /> |
| 1244 : | <include name="**/${projNamespace}*/**" /> | ||
| 1245 : | nickb | 1.63 | </zipfileset> |
| 1246 : | <zipfileset src="${buildDirectory}/${buildLabel}/${allZip}" | ||
| 1247 : | dirmode="775" | ||
| 1248 : | filemode="664" | ||
| 1249 : | id="rootfiles" | ||
| 1250 : | includes="**/eclipse/epl-v10.html, **/eclipse/notice.html" | ||
| 1251 : | /> | ||
| 1252 : | </zip> | ||
| 1253 : | |||
| 1254 : | nickb | 1.71 | <!-- build examples from ALL zip --> |
| 1255 : | nickb | 1.63 | <zip destfile="${buildDirectory}/${buildLabel}/${zipPrefix}-examples${incubation}-${buildAlias}.zip" update="true"> |
| 1256 : | <zipfileset src="${buildDirectory}/${buildLabel}/${allZip}" dirmode="775" filemode="664"> | ||
| 1257 : | nickb | 1.76 | <include name="**/${domainNamespace}.*.example*" /> |
| 1258 : | <include name="**/${domainNamespace}.*.example*/**" /> | ||
| 1259 : | nickb | 1.63 | </zipfileset> |
| 1260 : | <zipfileset refid="rootfiles" /> | ||
| 1261 : | </zip> | ||
| 1262 : | |||
| 1263 : | nickb | 1.108 | <!-- |
| 1264 : | to do other non-standard packaging (or to clean out third party stuff) | ||
| 1265 : | use buildExtra.xml#extraPackaging | ||
| 1266 : | --> | ||
| 1267 : | nickb | 1.117 | <antcall target="buildExtra.xml"> |
| 1268 : | <param name="theTarget" value="extraPackaging" /> | ||
| 1269 : | nickb | 1.118 | <param name="showWarning" value="true" /> |
| 1270 : | nickb | 1.117 | </antcall> |
| 1271 : | |||
| 1272 : | <antcall target="processMasterZip" /> | ||
| 1273 : | </target> | ||
| 1274 : | |||
| 1275 : | <target name="buildExtra.xml" description="call buildExtra.xml and run a specific target if it exists; fail silently if showWarning not true"> | ||
| 1276 : | <property name="theTarget" value="getDependencies" /> | ||
| 1277 : | <property name="showWarning" value="false" /> | ||
| 1278 : | nickb | 1.63 | <if> |
| 1279 : | <available file="${relengBuilderDir}/buildExtra.xml" type="file" /> | ||
| 1280 : | <then> | ||
| 1281 : | nickb | 1.108 | <var name="buildExtra.xml.file" unset="true" /> |
| 1282 : | <loadfile property="buildExtra.xml.file" srcFile="${relengBuilderDir}/buildExtra.xml" /> | ||
| 1283 : | <if> | ||
| 1284 : | nickb | 1.117 | <contains string="${buildExtra.xml.file}" substring="target name="${theTarget}"" /> |
| 1285 : | nickb | 1.108 | <then> |
| 1286 : | nickb | 1.117 | <subant target="${theTarget}" |
| 1287 : | description="Run project's ${relengBuilderDir}/buildExtra.xml#${theTarget}" | ||
| 1288 : | nickb | 1.108 | antfile="buildExtra.xml" |
| 1289 : | buildpath="${relengBuilderDir}" | ||
| 1290 : | inheritAll="true" | ||
| 1291 : | failOnError="false" | ||
| 1292 : | /> | ||
| 1293 : | <var name="buildExtra.xml.file" unset="true" /> | ||
| 1294 : | </then> | ||
| 1295 : | <else> | ||
| 1296 : | nickb | 1.117 | <if> |
| 1297 : | <equals arg1="${showWarning}" arg2="true" /> | ||
| 1298 : | <then> | ||
| 1299 : | <echo>Note: | ||
| 1300 : | Found buildExtra.xml but no ${theTarget} task. Nothing to do! | ||
| 1301 : | nickb | 1.108 | </echo> |
| 1302 : | nickb | 1.117 | </then> |
| 1303 : | </if> | ||
| 1304 : | nickb | 1.108 | </else> |
| 1305 : | </if> | ||
| 1306 : | nickb | 1.63 | </then> |
| 1307 : | </if> | ||
| 1308 : | </target> | ||
| 1309 : | |||
| 1310 : | <target name="buildTests"> | ||
| 1311 : | <ant antfile="${relengCommonBuilderDir}/build.xml" target="main"> | ||
| 1312 : | <property name="component" value="builder/tests" /> | ||
| 1313 : | </ant> | ||
| 1314 : | </target> | ||
| 1315 : | |||
| 1316 : | nickb | 1.1 | <target name="create.label.properties" unless="label.properties.exists"> |
| 1317 : | <mkdir dir="${buildDirectory}" /> | ||
| 1318 : | <!--store the build label information in a file--> | ||
| 1319 : | nickb | 1.23 | <echo file="${buildDirectory}/label.properties" append="true">buildType=${buildType} |
| 1320 : | </echo> | ||
| 1321 : | <echo file="${buildDirectory}/label.properties" append="true">buildId=${buildId} | ||
| 1322 : | </echo> | ||
| 1323 : | <echo file="${buildDirectory}/label.properties" append="true">timestamp=${timestamp} | ||
| 1324 : | </echo> | ||
| 1325 : | <echo file="${buildDirectory}/label.properties" append="true">buildLabel=${buildLabel} | ||
| 1326 : | </echo> | ||
| 1327 : | <echo file="${buildDirectory}/label.properties" append="true">buildAlias=${buildAlias} | ||
| 1328 : | </echo> | ||
| 1329 : | nickb | 1.78 | <if> |
| 1330 : | <isset property="forceContextQualifier" /> | ||
| 1331 : | <then> | ||
| 1332 : | <echo file="${buildDirectory}/label.properties" append="true">forceContextQualifier=${forceContextQualifier} | ||
| 1333 : | </echo> | ||
| 1334 : | </then> | ||
| 1335 : | </if> | ||
| 1336 : | nickb | 1.1 | </target> |
| 1337 : | |||
| 1338 : | nickb | 1.30 | <target name="cleanup"> |
| 1339 : | nickb | 1.22 | <if> |
| 1340 : | nickb | 1.130 | |
| 1341 : | <!-- if noclean property is true, don't clean up. | ||
| 1342 : | or, if noclean file exists (tests failed), and noclean | ||
| 1343 : | property is either not set or is true, don't clean up | ||
| 1344 : | --> | ||
| 1345 : | nickb | 1.30 | <or> |
| 1346 : | nickb | 1.130 | <istrue value="${noclean}" /> |
| 1347 : | <and> | ||
| 1348 : | <available file="${buildDir}/noclean" type="file" /> | ||
| 1349 : | <or> | ||
| 1350 : | <not> | ||
| 1351 : | <isset property="noclean" /> | ||
| 1352 : | </not> | ||
| 1353 : | <istrue value="${noclean}" /> | ||
| 1354 : | </or> | ||
| 1355 : | </and> | ||
| 1356 : | nickb | 1.30 | </or> |
| 1357 : | nickb | 1.22 | <then> |
| 1358 : | nickb | 1.71 | <echo>The follow temporary files/folders should be deleted from your build: |
| 1359 : | nickb | 1.73 | ${buildDir}/*-AllFeaturesAndPlugins-*.zip* |
| 1360 : | nickb | 1.71 | ${buildDir}/*-Master-*.zip* |
| 1361 : | nickb | 1.22 | ${buildDir}/eclipse |
| 1362 : | ${buildDir}/testing</echo> | ||
| 1363 : | nickb | 1.30 | </then> |
| 1364 : | <else> | ||
| 1365 : | <echo>Remove temp dirs in ${buildDir}</echo> | ||
| 1366 : | nickb | 1.129 | <delete dir="${buildDir}/eclipse" followsymlinks="false" includeemptydirs="true" defaultexcludes="false" /> |
| 1367 : | <delete dir="${buildDir}/testing" followsymlinks="false" includeemptydirs="true" defaultexcludes="false" /> | ||
| 1368 : | nickb | 1.73 | <delete> |
| 1369 : | nickb | 1.74 | <fileset dir="${buildDir}" includes="*-Master-*.zip*, *-AllFeaturesAndPlugins-*.zip*" /> |
| 1370 : | nickb | 1.73 | </delete> |
| 1371 : | nickb | 1.22 | </else> |
| 1372 : | </if> | ||
| 1373 : | nickb | 1.1 | </target> |
| 1374 : | |||
| 1375 : | <target name="test"> | ||
| 1376 : | <property name="test.xml" value="../org.eclipse.releng.basebuilder/plugins/org.eclipse.build.tools/scripts/test.xml" /> | ||
| 1377 : | nickb | 1.40 | <if> |
| 1378 : | nickb | 1.44 | <or> |
| 1379 : | <equals arg1="${baseos}" arg2="linux" /> | ||
| 1380 : | <equals arg1="${baseos}" arg2="macosx" /> | ||
| 1381 : | </or> | ||
| 1382 : | nickb | 1.40 | <then> |
| 1383 : | nickb | 1.44 | <antcall target="test-nix-local" /> |
| 1384 : | nickb | 1.40 | </then> |
| 1385 : | nickb | 1.46 | <elseif> |
| 1386 : | <contains string="${baseos}" substring="win" /> | ||
| 1387 : | <then> | ||
| 1388 : | nickb | 1.56 | <echo> |
| 1389 : | ** Sorry, running headless JUnit tests is not yet supported on Windows. See http://bugs.eclipse.org/268420 ** | ||
| 1390 : | </echo> | ||
| 1391 : | <!-- <antcall target="test-win-local" /> --> | ||
| 1392 : | nickb | 1.46 | </then> |
| 1393 : | </elseif> | ||
| 1394 : | nickb | 1.40 | <else> |
| 1395 : | nickb | 1.56 | <echo> |
| 1396 : | ** Sorry, running headless JUnit tests is not yet supported on your platform, ${baseos}.${basews}. See http://bugs.eclipse.org/268420 | ||
| 1397 : | </echo> | ||
| 1398 : | nickb | 1.40 | </else> |
| 1399 : | </if> | ||
| 1400 : | nickb | 1.1 | </target> |
| 1401 : | |||
| 1402 : | nickb | 1.44 | <target name="test-nix-local"> |
| 1403 : | nickb | 1.59 | <if> |
| 1404 : | nickb | 1.56 | <equals arg1="${baseos}" arg2="macosx" /> |
| 1405 : | <then> | ||
| 1406 : | <echo> | ||
| 1407 : | ** Sorry, running headless JUnit tests is not yet supported on Mac OS X. See http://bugs.eclipse.org/268420 ** | ||
| 1408 : | </echo> | ||
| 1409 : | </then> | ||
| 1410 : | nickb | 1.59 | <else> |
| 1411 : | <ant antfile="${test.xml}"> | ||
| 1412 : | <property name="shell" value="runtests.sh" /> | ||
| 1413 : | <property name="tester" value="${basedir}/builder/tests" /> | ||
| 1414 : | </ant> | ||
| 1415 : | </else> | ||
| 1416 : | </if> | ||
| 1417 : | nickb | 1.1 | </target> |
| 1418 : | |||
| 1419 : | nickb | 1.46 | <target name="test-win-local"> |
| 1420 : | <ant antfile="${test.xml}"> | ||
| 1421 : | <property name="shell" value="runtests.cmd" /> | ||
| 1422 : | <property name="tester" value="${basedir}/builder/tests" /> | ||
| 1423 : | </ant> | ||
| 1424 : | </target> | ||
| 1425 : | |||
| 1426 : | nickb | 1.1 | <target name="publish"> |
| 1427 : | nickb | 1.22 | <echo message="Copy static files to build root folder" /> |
| 1428 : | nickb | 1.1 | <copy todir="${buildDirectory}/${buildLabel}" overwrite="true"> |
| 1429 : | nickb | 1.30 | <fileset dir="${relengCommonBuilderDir}/staticDropFiles" /> |
| 1430 : | nickb | 1.1 | </copy> |
| 1431 : | nickb | 1.67 | |
| 1432 : | nickb | 1.22 | <echo message="Move generated zips to build root folder" /> |
| 1433 : | <move todir="${buildDirectory}/.." failonerror="false" overwrite="true"> | ||
| 1434 : | <fileset dir="${buildDirectory}/${buildLabel}" /> | ||
| 1435 : | </move> | ||
| 1436 : | |||
| 1437 : | <!-- generate a log of any compiler problems, warnings, errors, or failures --> | ||
| 1438 : | <echo>Generate compilelogs/summary.txt</echo> | ||
| 1439 : | <if> | ||
| 1440 : | <available file="${buildDir}/compilelogs" type="dir" /> | ||
| 1441 : | <then> | ||
| 1442 : | <exec executable="bash" output="${buildDir}/compilelogs/summary.txt"> | ||
| 1443 : | <arg line="${relengCommonScriptsDir}/getCompilerResults.sh ${buildDir}/compilelogs" /> | ||
| 1444 : | </exec> | ||
| 1445 : | </then> | ||
| 1446 : | </if> | ||
| 1447 : | nickb | 1.75 | |
| 1448 : | <!-- https://bugs.eclipse.org/bugs/show_bug.cgi?id=266374#c4: create index files for subdirs --> | ||
| 1449 : | <for param="dir" list="testresults, compilelogs" delimiter=", "> | ||
| 1450 : | <sequential> | ||
| 1451 : | nickb | 1.77 | <if> |
| 1452 : | <available file="${buildDir}/@{dir}" type="dir" /> | ||
| 1453 : | <then> | ||
| 1454 : | <for param="subdir"> | ||
| 1455 : | <path> | ||
| 1456 : | <dirset dir="${buildDir}/@{dir}" /> | ||
| 1457 : | </path> | ||
| 1458 : | <sequential> | ||
| 1459 : | <copy file="${buildDir}/index.php" todir="@{subdir}" /> | ||
| 1460 : | </sequential> | ||
| 1461 : | </for> | ||
| 1462 : | </then> | ||
| 1463 : | </if> | ||
| 1464 : | nickb | 1.75 | </sequential> |
| 1465 : | </for> | ||
| 1466 : | nickb | 1.1 | </target> |
| 1467 : | |||
| 1468 : | <target name="generateDigests"> | ||
| 1469 : | nickb | 1.45 | <!-- Ant 1.7.x required for format="MD5SUM" --> |
| 1470 : | <for param="zip"> | ||
| 1471 : | <path> | ||
| 1472 : | <fileset dir="${buildDirectory}/${buildLabel}"> | ||
| 1473 : | <include name="*.zip" /> | ||
| 1474 : | </fileset> | ||
| 1475 : | </path> | ||
| 1476 : | <sequential> | ||
| 1477 : | nickb | 1.52 | <checksum file="@{zip}" format="MD5SUM" fileext=".md5" /> |
| 1478 : | nickb | 1.45 | </sequential> |
| 1479 : | </for> | ||
| 1480 : | nickb | 1.1 | </target> |
| 1481 : | |||
| 1482 : | nickb | 1.23 | <!-- |
| 1483 : | given a list of platforms & dependencies, assemble one or more all in ones | ||
| 1484 : | nickb | 1.18 | by copying the eclipse zip/tar.gz, then adding deps + SDK into it |
| 1485 : | --> | ||
| 1486 : | <target name="packAllInOnes" depends="init" description="create one or more all-in-one archives"> | ||
| 1487 : | nickb | 1.105 | <antcall target="-timestamp" inheritAll="false" /> |
| 1488 : | nickb | 1.18 | <!-- defaults, if not set in buildAll.xml --> |
| 1489 : | <if> | ||
| 1490 : | <not> | ||
| 1491 : | <isset property="allInOnePrefix" /> | ||
| 1492 : | </not> | ||
| 1493 : | <then> | ||
| 1494 : | <property name="allInOnePrefix" value="${projectName}-all-in-one" /> | ||
| 1495 : | </then> | ||
| 1496 : | </if> | ||
| 1497 : | <if> | ||
| 1498 : | <not> | ||
| 1499 : | <isset property="allInOnePlatforms" /> | ||
| 1500 : | </not> | ||
| 1501 : | <then> | ||
| 1502 : | <property name="allInOnePlatforms" value="linux-gtk,win32,macosx-carbon" /> | ||
| 1503 : | </then> | ||
| 1504 : | </if> | ||
| 1505 : | <if> | ||
| 1506 : | <not> | ||
| 1507 : | <isset property="allInOneEclipseBase" /> | ||
| 1508 : | </not> | ||
| 1509 : | <then> | ||
| 1510 : | <property name="allInOneEclipseBase" value="SDK" /> | ||
| 1511 : | </then> | ||
| 1512 : | </if> | ||
| 1513 : | <if> | ||
| 1514 : | <not> | ||
| 1515 : | <isset property="allInOneInputs" /> | ||
| 1516 : | </not> | ||
| 1517 : | <then> | ||
| 1518 : | <property name="allInOneInputs" value="${allZip}" /> | ||
| 1519 : | </then> | ||
| 1520 : | </if> | ||
| 1521 : | <if> | ||
| 1522 : | <not> | ||
| 1523 : | <isset property="allInOneInputExtras" /> | ||
| 1524 : | </not> | ||
| 1525 : | <then> | ||
| 1526 : | <property name="allInOneInputExtras" value="" /> | ||
| 1527 : | </then> | ||
| 1528 : | </if> | ||
| 1529 : | <if> | ||
| 1530 : | <not> | ||
| 1531 : | <isset property="allInOneBuildTypes" /> | ||
| 1532 : | </not> | ||
| 1533 : | <then> | ||
| 1534 : | <property name="allInOneBuildTypes" value="S,R" /> | ||
| 1535 : | </then> | ||
| 1536 : | </if> | ||
| 1537 : | nickb | 1.139 | |
| 1538 : | nickb | 1.18 | <if> |
| 1539 : | nickb | 1.140 | <not> |
| 1540 : | <isset property="incubation" /> | ||
| 1541 : | </not> | ||
| 1542 : | nickb | 1.18 | <then> |
| 1543 : | <property name="incubation" value="" /> | ||
| 1544 : | </then> | ||
| 1545 : | </if> | ||
| 1546 : | |||
| 1547 : | <for param="allInOneBuildType" list="${allInOneBuildTypes}"> | ||
| 1548 : | <sequential> | ||
| 1549 : | <if> | ||
| 1550 : | <equals arg1="${buildType}" arg2="@{allInOneBuildType}" /> | ||
| 1551 : | <then> | ||
| 1552 : | <echo message="Generating type ${buildType} All-In-One archive(s) ..." /> | ||
| 1553 : | <var name="allInOneArchiveTmp" value="${buildDirectory}/${buildLabel}/allInOneArchiveTmp" /> | ||
| 1554 : | |||
| 1555 : | <!-- for all the platform suffixes to build... --> | ||
| 1556 : | <for param="platformSuffix" list="${allInOnePlatforms}"> | ||
| 1557 : | <sequential> | ||
| 1558 : | <if> | ||
| 1559 : | <equals arg1="@{platformSuffix}" arg2="win32" /> | ||
| 1560 : | <then> | ||
| 1561 : | <var name="allInOneArchiveSuffix" value=".zip" /> | ||
| 1562 : | </then> | ||
| 1563 : | <else> | ||
| 1564 : | <var name="allInOneArchiveSuffix" value=".tar" /> | ||
| 1565 : | </else> | ||
| 1566 : | </if> | ||
| 1567 : | <if> | ||
| 1568 : | <equals arg1="@{platformSuffix}" arg2="win32" /> | ||
| 1569 : | <then> | ||
| 1570 : | <var name="eclipseSuffix" value=".zip" /> | ||
| 1571 : | </then> | ||
| 1572 : | <else> | ||
| 1573 : | <var name="eclipseSuffix" value=".tar.gz" /> | ||
| 1574 : | </else> | ||
| 1575 : | </if> | ||
| 1576 : | <var name="allInOneArchive" | ||
| 1577 : | value="${allInOnePrefix}-@{platformSuffix}${incubation}-${buildAlias}${allInOneArchiveSuffix}" | ||
| 1578 : | /> | ||
| 1579 : | <var name="allInOneArchivePath" value="${buildDirectory}/${buildLabel}/${allInOneArchive}" /> | ||
| 1580 : | |||
| 1581 : | <!-- get the Eclipse bundle if not already downloaded: only need linux-gtk to build, but need others to package up all-in-ones --> | ||
| 1582 : | nickb | 1.118 | <!-- <echo message="orig eclipse.base.file = ${eclipse.base.file}" /> --> |
| 1583 : | nickb | 1.18 | <propertyregex property="thisEclipseFile" |
| 1584 : | nickb | 1.118 | input="${eclipse.base.file}" |
| 1585 : | nickb | 1.18 | regexp="(eclipse-)(SDK-)(.+)(-linux-gtk\.tar\.gz)" |
| 1586 : | replace="\1${allInOneEclipseBase}-\3-@{platformSuffix}${eclipseSuffix}" | ||
| 1587 : | casesensitive="false" | ||
| 1588 : | /> | ||
| 1589 : | nickb | 1.118 | <!-- <echo message="this eclipse.base.file = ${thisEclipseFile}" /> --> |
| 1590 : | nickb | 1.18 | <if> |
| 1591 : | <not> | ||
| 1592 : | <available file="${downloadsDir}/${thisEclipseFile}" type="file" /> | ||
| 1593 : | </not> | ||
| 1594 : | <then> | ||
| 1595 : | nickb | 1.118 | <!-- <echo message="orig eclipse.base.url = ${eclipse.base.url}" /> --> |
| 1596 : | nickb | 1.18 | <propertyregex property="thisEclipseURL" |
| 1597 : | nickb | 1.118 | input="${eclipse.base.url}" |
| 1598 : | nickb | 1.18 | regexp="(.+eclipse-)(SDK-)(.+)(-linux-gtk\.tar\.gz)" |
| 1599 : | replace="\1${allInOneEclipseBase}-\3-@{platformSuffix}${eclipseSuffix}" | ||
| 1600 : | casesensitive="false" | ||
| 1601 : | /> | ||
| 1602 : | nickb | 1.118 | <!-- <echo message="this eclipse.base.url = ${thisEclipseURL}" /> --> |
| 1603 : | nickb | 1.105 | <antcall target="-timestamp" inheritAll="false" /> |
| 1604 : | nickb | 1.18 | <get src="${thisEclipseURL}" dest="${downloadsDir}/${thisEclipseFile}" usetimestamp="true" /> |
| 1605 : | <touch file="${downloadsDir}/${thisEclipseFile}" /> | ||
| 1606 : | </then> | ||
| 1607 : | </if> | ||
| 1608 : | |||
| 1609 : | nickb | 1.105 | <antcall target="-timestamp" inheritAll="false" /> |
| 1610 : | nickb | 1.18 | |
| 1611 : | <!-- unpack project's SDK and/or ALL zip --> | ||
| 1612 : | <for param="allInOneInput" list="${allInOneInputs}"> | ||
| 1613 : | <sequential> | ||
| 1614 : | nickb | 1.105 | <antcall target="-timestamp" inheritAll="false" /> |
| 1615 : | nickb | 1.18 | <!-- <echo message="Add @{allInOneInput} into ${allInOneArchiveTmp} ..." /> --> |
| 1616 : | <unzip src="${buildDirectory}/${buildLabel}/@{allInOneInput}" dest="${allInOneArchiveTmp}/eclipse/dropins/" /> | ||
| 1617 : | </sequential> | ||
| 1618 : | </for> | ||
| 1619 : | <!-- unpack each dep --> | ||
| 1620 : | nickb | 1.19 | <for param="dependency.file" list="${required.dependency.files}"> |
| 1621 : | nickb | 1.18 | <sequential> |
| 1622 : | nickb | 1.105 | <antcall target="-timestamp" inheritAll="false" /> |
| 1623 : | nickb | 1.19 | <!-- <echo message="Add @{dependency.file} into ${allInOneArchiveTmp} ..." /> --> |
| 1624 : | <unzip src="${downloadsDir}/@{dependency.file}" dest="${allInOneArchiveTmp}/eclipse/dropins/" /> | ||
| 1625 : | nickb | 1.18 | </sequential> |
| 1626 : | </for> | ||
| 1627 : | <!-- unpack extra deps (if any) --> | ||
| 1628 : | nickb | 1.19 | <for param="extra.dependency.file" list="${allInOneInputExtras}"> |
| 1629 : | nickb | 1.18 | <sequential> |
| 1630 : | nickb | 1.105 | <antcall target="-timestamp" inheritAll="false" /> |
| 1631 : | nickb | 1.19 | <!-- <echo message="Add @{extra.dependency.file} into ${allInOneArchiveTmp} ..." /> --> |
| 1632 : | <unzip src="${downloadsDir}/@{extra.dependency.file}" dest="${allInOneArchiveTmp}/eclipse/dropins/" /> | ||
| 1633 : | nickb | 1.18 | </sequential> |
| 1634 : | </for> | ||
| 1635 : | |||
| 1636 : | nickb | 1.105 | <antcall target="-timestamp" inheritAll="false" /> |
| 1637 : | nickb | 1.18 | <!-- <echo message="Create ${allInOneArchive} from ${thisEclipseFile} ..." /> --> |
| 1638 : | <if> | ||
| 1639 : | <equals arg1="@{platformSuffix}" arg2="win32" /> | ||
| 1640 : | <then> | ||
| 1641 : | <!-- copy & rename the Eclipse SDK --> | ||
| 1642 : | <copy file="${downloadsDir}/${thisEclipseFile}" tofile="${allInOneArchivePath}" /> | ||
| 1643 : | |||
| 1644 : | <!-- add deps + project files --> | ||
| 1645 : | <zip destfile="${allInOneArchivePath}" update="true"> | ||
| 1646 : | <fileset dir="${allInOneArchiveTmp}" /> | ||
| 1647 : | </zip> | ||
| 1648 : | </then> | ||
| 1649 : | <else> | ||
| 1650 : | <!-- copy & rename the Eclipse SDK --> | ||
| 1651 : | <gunzip src="${downloadsDir}/${thisEclipseFile}" dest="${allInOneArchivePath}" /> | ||
| 1652 : | <exec executable="/bin/tar" dir="${allInOneArchiveTmp}" failonerror="true"> | ||
| 1653 : | <arg line="upf ${allInOneArchivePath} eclipse" /> | ||
| 1654 : | </exec> | ||
| 1655 : | <gzip src="${allInOneArchivePath}" destfile="${allInOneArchivePath}.gz" /> | ||
| 1656 : | <delete file="${allInOneArchivePath}" /> | ||
| 1657 : | </else> | ||
| 1658 : | </if> | ||
| 1659 : | <var name="thisEclipseFile" unset="true" /> | ||
| 1660 : | <var name="thisEclipseURL" unset="true" /> | ||
| 1661 : | </sequential> | ||
| 1662 : | </for> | ||
| 1663 : | nickb | 1.105 | <antcall target="-timestamp" inheritAll="false" /> |
| 1664 : | nickb | 1.18 | <delete dir="${allInOneArchiveTmp}" includeemptydirs="true" quiet="true" failonerror="false" /> |
| 1665 : | </then> | ||
| 1666 : | </if> | ||
| 1667 : | </sequential> | ||
| 1668 : | </for> | ||
| 1669 : | </target> | ||
| 1670 : | |||
| 1671 : | nickb | 1.82 | <!-- DEBUG: |
| 1672 : | To test this script locally to see what output it will generate (particularly re: URL parsing) in build.cfg, | ||
| 1673 : | set "localtest" = "true" in "genBuildCfgInit" target, then run the "genBuildCfg" target and watch console output | ||
| 1674 : | --> | ||
| 1675 : | nickb | 1.23 | <target name="genBuildCfgInit" depends="init"> |
| 1676 : | <!-- | ||
| 1677 : | INPUTS: | ||
| 1678 : | |||
| 1679 : | for overall start.sh / buildAll.xml | ||
| 1680 : | |||
| 1681 : | + cvs/svn details for .releng project | ||
| 1682 : | (must be set, but can be a local dir rather than VCS path) | ||
| 1683 : | + projectid (must be set, eg., modeling.emf.cdo or tools.gef) | ||
| 1684 : | buildTimestamp (opt, will generate) | ||
| 1685 : | buildType (opt, def N) | ||
| 1686 : | buildAlias (opt, for specially-named milestones & RC builds, eg., "1.0.0M7") | ||
| 1687 : | writableBuildRoot (eg., ${WORKSPACE} for Hudson builds, or if non-standard value used) | ||
| 1688 : | version (if not set in build.properties) | ||
| 1689 : | basebuilderBranch (if not set in build.properties) | ||
| 1690 : | javaHome (if not set in build.properties) | ||
| 1691 : | downloadsDir (if not set in build.properties) | ||
| 1692 : | |||
| 1693 : | nickb | 1.29 | for buildAllHelper.xml#genBuildCfg, only need three values |
| 1694 : | nickb | 1.23 | |
| 1695 : | projectid | ||
| 1696 : | relengBuilderDir (OR buildDir) | ||
| 1697 : | dependencyURLs (comma-separated list of required dependencies, if not set in project's build.properties) | ||
| 1698 : | --> | ||
| 1699 : | |||
| 1700 : | nickb | 1.100 | <property name="localtest" value="false" /> |
| 1701 : | nickb | 1.23 | <if> |
| 1702 : | nickb | 1.134 | <istrue value="${localtest}" /> |
| 1703 : | nickb | 1.23 | <then> |
| 1704 : | <property name="debug" value="true" /> | ||
| 1705 : | <property name="downloadZipsIfNotFound" value="false" /> | ||
| 1706 : | </then> | ||
| 1707 : | <else> | ||
| 1708 : | <property name="debug" value="false" /> | ||
| 1709 : | <property name="downloadZipsIfNotFound" value="true" /> | ||
| 1710 : | </else> | ||
| 1711 : | </if> | ||
| 1712 : | |||
| 1713 : | <!-- MUST BE SET COMMANDLINE if not already defined in project's releng/build.properties | ||
| 1714 : | -Dprojectid=top.proj.sub (modeling.emf.cdo) or proj.sub (tools.myproject) --> | ||
| 1715 : | <property name="projectid" value="tools.myproject" /> | ||
| 1716 : | nickb | 1.76 | <antcallback target="projectid2names" return="topprojectName, projectName, subprojectName" /> |
| 1717 : | nickb | 1.23 | |
| 1718 : | <if> | ||
| 1719 : | <not> | ||
| 1720 : | <isset property="buildTimestamp" /> | ||
| 1721 : | </not> | ||
| 1722 : | <then> | ||
| 1723 : | <if> | ||
| 1724 : | <isset property="buildDir" /> | ||
| 1725 : | <then> | ||
| 1726 : | <!-- generate buildTimestamp as last folder in buildDir's path --> | ||
| 1727 : | <propertyregex property="buildTimestamp" | ||
| 1728 : | nickb | 1.137 | defaultvalue="NONE" |
| 1729 : | nickb | 1.23 | input="${buildDir}" |
| 1730 : | casesensitive="" | ||
| 1731 : | regexp="(.+)/([NIMSR])([^/]+)" | ||
| 1732 : | replace="\3" | ||
| 1733 : | override="true" | ||
| 1734 : | /> | ||
| 1735 : | nickb | 1.137 | <if> |
| 1736 : | <equals arg1="${buildTimestamp}" arg2="NONE" /> | ||
| 1737 : | <then> | ||
| 1738 : | nickb | 1.138 | <var name="buildTimestamp" unset="true" /> |
| 1739 : | nickb | 1.137 | <tstamp> |
| 1740 : | <format property="buildTimestamp" pattern="yyyyMMddHHmm" /> | ||
| 1741 : | </tstamp> | ||
| 1742 : | <echo>Ant generated: buildTimestamp=${buildTimestamp}</echo> | ||
| 1743 : | </then> | ||
| 1744 : | </if> | ||
| 1745 : | nickb | 1.23 | </then> |
| 1746 : | <else> | ||
| 1747 : | <tstamp> | ||
| 1748 : | nickb | 1.26 | <format property="buildTimestamp" pattern="yyyyMMddHHmm" /> |
| 1749 : | nickb | 1.23 | </tstamp> |
| 1750 : | nickb | 1.26 | <echo>Ant generated: buildTimestamp=${buildTimestamp}</echo> |
| 1751 : | nickb | 1.23 | </else> |
| 1752 : | </if> | ||
| 1753 : | </then> | ||
| 1754 : | </if> | ||
| 1755 : | |||
| 1756 : | <if> | ||
| 1757 : | <not> | ||
| 1758 : | <isset property="buildType" /> | ||
| 1759 : | </not> | ||
| 1760 : | <then> | ||
| 1761 : | <if> | ||
| 1762 : | <isset property="buildDir" /> | ||
| 1763 : | <then> | ||
| 1764 : | <!-- generate buildType as first letter of last folder in buildDir's path --> | ||
| 1765 : | <propertyregex property="buildType" | ||
| 1766 : | defaultvalue="${buildDir}" | ||
| 1767 : | input="${buildDir}" | ||
| 1768 : | casesensitive="" | ||
| 1769 : | regexp="(.+)/([NIMSR])([^/]+)" | ||
| 1770 : | replace="\2" | ||
| 1771 : | override="true" | ||
| 1772 : | /> | ||
| 1773 : | </then> | ||
| 1774 : | <else> | ||
| 1775 : | <property name="buildType" value="N" /> | ||
| 1776 : | </else> | ||
| 1777 : | </if> | ||
| 1778 : | </then> | ||
| 1779 : | </if> | ||
| 1780 : | |||
| 1781 : | <if> | ||
| 1782 : | <not> | ||
| 1783 : | <isset property="buildDir" /> | ||
| 1784 : | </not> | ||
| 1785 : | <then> | ||
| 1786 : | <if> | ||
| 1787 : | <isset property="relengBuilderDir" /> | ||
| 1788 : | <then> | ||
| 1789 : | <!-- generate buildDir as relengBuilderDir's parent --> | ||
| 1790 : | <propertyregex property="buildDir" | ||
| 1791 : | defaultvalue="${relengBuilderDir}" | ||
| 1792 : | input="${relengBuilderDir}" | ||
| 1793 : | casesensitive="" | ||
| 1794 : | regexp="(.+)/([^/]+)" | ||
| 1795 : | replace="\1" | ||
| 1796 : | override="true" | ||
| 1797 : | /> | ||
| 1798 : | </then> | ||
| 1799 : | <else> | ||
| 1800 : | nickb | 1.24 | <!-- convert projectid to path --> |
| 1801 : | nickb | 1.30 | <propertyregex property="projectPath" |
| 1802 : | defaultValue="${projectid}" | ||
| 1803 : | input="${projectid}" | ||
| 1804 : | casesensitive="false" | ||
| 1805 : | regexp="\." | ||
| 1806 : | replace="/" | ||
| 1807 : | override="true" | ||
| 1808 : | /> | ||
| 1809 : | nickb | 1.23 | <property name="buildDir" |
| 1810 : | nickb | 1.34 | value="${writableBuildRoot}/${projectPath}/downloads/drops/${version}/${buildType}${buildTimestamp}" |
| 1811 : | nickb | 1.23 | /> |
| 1812 : | </else> | ||
| 1813 : | </if> | ||
| 1814 : | </then> | ||
| 1815 : | </if> | ||
| 1816 : | nickb | 1.30 | <mkdir dir="${buildDir}" /> |
| 1817 : | nickb | 1.23 | |
| 1818 : | <!-- CAN BE SET COMMANDLINE: -Dbuildcfg=/path/to/build.cfg --> | ||
| 1819 : | <if> | ||
| 1820 : | <not> | ||
| 1821 : | <isset property="buildcfg" /> | ||
| 1822 : | </not> | ||
| 1823 : | <then> | ||
| 1824 : | <if> | ||
| 1825 : | <isset property="buildDir" /> | ||
| 1826 : | <then> | ||
| 1827 : | <property name="buildcfg" value="${buildDir}/build.cfg" /> | ||
| 1828 : | </then> | ||
| 1829 : | <else> | ||
| 1830 : | <property name="buildcfg" value="${basedir}/build.cfg" /> | ||
| 1831 : | </else> | ||
| 1832 : | </if> | ||
| 1833 : | </then> | ||
| 1834 : | </if> | ||
| 1835 : | |||
| 1836 : | <!-- start with a clean file every time --> | ||
| 1837 : | <if> | ||
| 1838 : | <available file="${buildcfg}" type="file" /> | ||
| 1839 : | <then> | ||
| 1840 : | <delete file="${buildcfg}" /> | ||
| 1841 : | </then> | ||
| 1842 : | </if> | ||
| 1843 : | |||
| 1844 : | </target> | ||
| 1845 : | |||
| 1846 : | nickb | 1.82 | <!-- DEBUG: |
| 1847 : | To test this script locally to see what output it will generate (particularly re: URL parsing) in build.cfg, | ||
| 1848 : | set "localtest" = "true" in "genBuildCfgInit" target, then run the "genBuildCfg" target and watch console output | ||
| 1849 : | --> | ||
| 1850 : | nickb | 1.23 | <target name="genBuildCfg" depends="genBuildCfgInit" description="Create build.cfg file"> |
| 1851 : | |||
| 1852 : | <antcallback target="createBuildConfigFile" return="buildcfg" /> | ||
| 1853 : | <echo>Created ${buildcfg}</echo> | ||
| 1854 : | <property file="${buildcfg}" /> | ||
| 1855 : | nickb | 1.30 | <mkdir dir="${downloadsDir}" /> |
| 1856 : | <mkdir dir="${buildDir}" /> | ||
| 1857 : | nickb | 1.23 | |
| 1858 : | nickb | 1.114 | <if> |
| 1859 : | nickb | 1.134 | <isfalse value="${localtest}" /> |
| 1860 : | nickb | 1.114 | <then> |
| 1861 : | <!-- determine the type of maps used in the build --> | ||
| 1862 : | <antcallback target="collectMapTypes" return="mapTypes" /> | ||
| 1863 : | <echo>Found these map entry types: ${mapTypes}</echo> | ||
| 1864 : | </then> | ||
| 1865 : | </if> | ||
| 1866 : | nickb | 1.107 | |
| 1867 : | nickb | 1.23 | <!-- generate URL-related properties --> |
| 1868 : | <antcallback target="collectURLs" return="numURLs" /> | ||
| 1869 : | <echo>Found ${numURLs} dependency URLs</echo> | ||
| 1870 : | |||
| 1871 : | </target> | ||
| 1872 : | |||
| 1873 : | <target name="createBuildConfigFile"> | ||
| 1874 : | |||
| 1875 : | nickb | 1.120 | <!-- dump all commandline vars set above as they should override anything set in .properties files below: see also buildAll.xml#runEclipse --> |
| 1876 : | nickb | 1.124 | <antcallback return="commandlineArgsList" target="initCommandlineArgsList" /> |
| 1877 : | nickb | 1.30 | <echo file="${buildcfg}" append="true"> |
| 1878 : | # Commandline variables override default values set below | ||
| 1879 : | nickb | 1.33 | |
| 1880 : | # Note that this file is meant to be read by Ant, not shell, | ||
| 1881 : | nickb | 1.30 | # so only the first assignment of a variable will stick |
| 1882 : | nickb | 1.33 | # If parsing this file, make sure to stop after the first |
| 1883 : | nickb | 1.30 | # variable is found. |
| 1884 : | nickb | 1.33 | |
| 1885 : | nickb | 1.23 | </echo> |
| 1886 : | nickb | 1.120 | <for param="clv" list="${commandlineArgsList}" delimiter=", |
| 1887 : | "> | ||
| 1888 : | nickb | 1.23 | <sequential> |
| 1889 : | <if> | ||
| 1890 : | <isset property="@{clv}" /> | ||
| 1891 : | <then> | ||
| 1892 : | <echo file="${buildcfg}" append="true">@{clv}=${@{clv}} | ||
| 1893 : | </echo> | ||
| 1894 : | </then> | ||
| 1895 : | </if> | ||
| 1896 : | </sequential> | ||
| 1897 : | </for> | ||
| 1898 : | |||
| 1899 : | <if> | ||
| 1900 : | <isset property="localSourceCheckoutDir" /> | ||
| 1901 : | <then> | ||
| 1902 : | <echo file="${buildcfg}" append="true"> | ||
| 1903 : | |||
| 1904 : | # build from local source instead of VCS repo? | ||
| 1905 : | skipFetch=true | ||
| 1906 : | localSourceCheckoutDir=${localSourceCheckoutDir} | ||
| 1907 : | </echo> | ||
| 1908 : | nickb | 1.83 | <property name="forceContextQualifier" value="v${buildTimestamp}" /> |
| 1909 : | nickb | 1.23 | </then> |
| 1910 : | </if> | ||
| 1911 : | nickb | 1.79 | |
| 1912 : | nickb | 1.78 | <if> |
| 1913 : | <isset property="forceContextQualifier" /> | ||
| 1914 : | <then> | ||
| 1915 : | nickb | 1.116 | <echo file="${buildcfg}" append="true"> |
| 1916 : | forceContextQualifier=${forceContextQualifier} | ||
| 1917 : | </echo> | ||
| 1918 : | nickb | 1.80 | </then> |
| 1919 : | </if> | ||
| 1920 : | nickb | 1.119 | |
| 1921 : | <if> | ||
| 1922 : | nickb | 1.127 | <or> |
| 1923 : | <not> | ||
| 1924 : | <isset property="packageFeaturesIncludedBinaries" /> | ||
| 1925 : | </not> | ||
| 1926 : | nickb | 1.121 | <istrue value="${packageFeaturesIncludedBinaries}" /> |
| 1927 : | nickb | 1.127 | </or> |
| 1928 : | nickb | 1.119 | <then> |
| 1929 : | <echo file="${buildcfg}" append="true"> | ||
| 1930 : | runPackager=true | ||
| 1931 : | </echo> | ||
| 1932 : | </then> | ||
| 1933 : | </if> | ||
| 1934 : | |||
| 1935 : | nickb | 1.80 | <if> |
| 1936 : | <isset property="fetchTag" /> | ||
| 1937 : | <then> | ||
| 1938 : | nickb | 1.115 | <echo file="${buildcfg}" append="true"> |
| 1939 : | fetchTag=${fetchTag} | ||
| 1940 : | </echo> | ||
| 1941 : | nickb | 1.78 | </then> |
| 1942 : | </if> | ||
| 1943 : | nickb | 1.23 | |
| 1944 : | nickb | 1.58 | <!-- linux + windows, want parent of .../jre or ...\jre |
| 1945 : | mac, just use ${java.home} | ||
| 1946 : | nickb | 1.54 | --> |
| 1947 : | nickb | 1.51 | <propertyregex property="JAVA_HOME_PARENT" |
| 1948 : | defaultvalue="${java.home}" | ||
| 1949 : | input="${java.home}" | ||
| 1950 : | casesensitive="false" | ||
| 1951 : | regexp="(.+)([^/\\]+)(/|\\)jre" | ||
| 1952 : | replace="\1\2" | ||
| 1953 : | override="true" | ||
| 1954 : | /> | ||
| 1955 : | nickb | 1.54 | |
| 1956 : | nickb | 1.23 | <echo file="${buildcfg}" append="true"> |
| 1957 : | |||
| 1958 : | # Environment variables | ||
| 1959 : | HOME=${user.home} | ||
| 1960 : | nickb | 1.51 | JAVA_HOME=${JAVA_HOME_PARENT} |
| 1961 : | java.home=${JAVA_HOME} | ||
| 1962 : | nickb | 1.47 | ANT_HOME=${ant.home} |
| 1963 : | nickb | 1.51 | ANT=${ant.home}/bin/ant |
| 1964 : | |||
| 1965 : | nickb | 1.23 | #Platform details |
| 1966 : | </echo> | ||
| 1967 : | |||
| 1968 : | <!-- TODO: is this redundant to what's in buildAll.xml? --> | ||
| 1969 : | |||
| 1970 : | <!-- os name --> | ||
| 1971 : | <if> | ||
| 1972 : | <equals arg1="${os.name}" arg2="linux" casesensitive="false" /> | ||
| 1973 : | <then> | ||
| 1974 : | <echo file="${buildcfg}" append="true">baseos=linux | ||
| 1975 : | </echo> | ||
| 1976 : | </then> | ||
| 1977 : | <elseif> | ||
| 1978 : | <and> | ||
| 1979 : | <contains string="${os.name}" substring="64" casesensitive="false" /> | ||
| 1980 : | <contains string="${os.name}" substring="win" casesensitive="false" /> | ||
| 1981 : | </and> | ||
| 1982 : | <then> | ||
| 1983 : | <echo file="${buildcfg}" append="true">baseos=win64 | ||
| 1984 : | </echo> | ||
| 1985 : | </then> | ||
| 1986 : | </elseif> | ||
| 1987 : | <elseif> | ||
| 1988 : | <contains string="${os.name}" substring="win" casesensitive="false" /> | ||
| 1989 : | <then> | ||
| 1990 : | <echo file="${buildcfg}" append="true">baseos=win32 | ||
| 1991 : | </echo> | ||
| 1992 : | </then> | ||
| 1993 : | </elseif> | ||
| 1994 : | <elseif> | ||
| 1995 : | <contains string="${os.name}" substring="mac" casesensitive="false" /> | ||
| 1996 : | <then> | ||
| 1997 : | <echo file="${buildcfg}" append="true">baseos=macosx | ||
| 1998 : | </echo> | ||
| 1999 : | </then> | ||
| 2000 : | </elseif> | ||
| 2001 : | <else> | ||
| 2002 : | <echo file="${buildcfg}" append="true">baseos=${os.name} | ||
| 2003 : | </echo> | ||
| 2004 : | </else> | ||
| 2005 : | </if> | ||
| 2006 : | |||
| 2007 : | <!-- architecture --> | ||
| 2008 : | <if> | ||
| 2009 : | <or> | ||
| 2010 : | <equals arg1="${os.arch}" arg2="i386" /> | ||
| 2011 : | <equals arg1="${os.arch}" arg2="i486" /> | ||
| 2012 : | <equals arg1="${os.arch}" arg2="i586" /> | ||
| 2013 : | <equals arg1="${os.arch}" arg2="i686" /> | ||
| 2014 : | </or> | ||
| 2015 : | <then> | ||
| 2016 : | <echo file="${buildcfg}" append="true">basearch=x86 | ||
| 2017 : | </echo> | ||
| 2018 : | </then> | ||
| 2019 : | <elseif> | ||
| 2020 : | <equals arg1="${os.arch}" arg2="amd64" /> | ||
| 2021 : | <then> | ||
| 2022 : | <echo file="${buildcfg}" append="true">basearch=x86_64 | ||
| 2023 : | </echo> | ||
| 2024 : | </then> | ||
| 2025 : | </elseif> | ||
| 2026 : | <elseif> | ||
| 2027 : | <equals arg1="${os.arch}" arg2="ppc64" /> | ||
| 2028 : | <then> | ||
| 2029 : | <echo file="${buildcfg}" append="true">basearch=ppc64 | ||
| 2030 : | </echo> | ||
| 2031 : | </then> | ||
| 2032 : | </elseif> | ||
| 2033 : | <else> | ||
| 2034 : | <echo file="${buildcfg}" append="true">basearch=${os.arch} | ||
| 2035 : | </echo> | ||
| 2036 : | </else> | ||
| 2037 : | </if> | ||
| 2038 : | |||
| 2039 : | <!-- window system --> | ||
| 2040 : | <if> | ||
| 2041 : | <equals arg1="${os.name}" arg2="linux" casesensitive="false" /> | ||
| 2042 : | <then> | ||
| 2043 : | <echo file="${buildcfg}" append="true">basews=gtk | ||
| 2044 : | </echo> | ||
| 2045 : | </then> | ||
| 2046 : | <elseif> | ||
| 2047 : | <and> | ||
| 2048 : | <contains string="${os.name}" substring="64" casesensitive="false" /> | ||
| 2049 : | <contains string="${os.name}" substring="win" casesensitive="false" /> | ||
| 2050 : | </and> | ||
| 2051 : | <then> | ||
| 2052 : | <echo file="${buildcfg}" append="true">basews=win64 | ||
| 2053 : | </echo> | ||
| 2054 : | </then> | ||
| 2055 : | </elseif> | ||
| 2056 : | <elseif> | ||
| 2057 : | <contains string="${os.name}" substring="win" casesensitive="false" /> | ||
| 2058 : | <then> | ||
| 2059 : | <echo file="${buildcfg}" append="true">basews=win32 | ||
| 2060 : | </echo> | ||
| 2061 : | </then> | ||
| 2062 : | </elseif> | ||
| 2063 : | <elseif> | ||
| 2064 : | <contains string="${os.name}" substring="mac" casesensitive="false" /> | ||
| 2065 : | <then> | ||
| 2066 : | <!-- should this be carbon? --> | ||
| 2067 : | <echo file="${buildcfg}" append="true">basews=cocoa | ||
| 2068 : | </echo> | ||
| 2069 : | </then> | ||
| 2070 : | </elseif> | ||
| 2071 : | </if> | ||
| 2072 : | |||
| 2073 : | <!-- merge other properties files into build.cfg so in order of override priority, and expand variables --> | ||
| 2074 : | nickb | 1.82 | <if> |
| 2075 : | nickb | 1.134 | <isfalse value="${localtest}" /> |
| 2076 : | nickb | 1.82 | <then> |
| 2077 : | |||
| 2078 : | <loadfile property="builder.build.properties.file" srcFile="${relengBuilderDir}/build.properties"> | ||
| 2079 : | <filterchain> | ||
| 2080 : | <expandproperties /> | ||
| 2081 : | </filterchain> | ||
| 2082 : | </loadfile> | ||
| 2083 : | <property file="${relengBuilderDir}/build.properties" /> | ||
| 2084 : | <loadfile property="common.build.properties.file" srcFile="${relengCommonBuilderDir}/build.properties"> | ||
| 2085 : | <filterchain> | ||
| 2086 : | <expandproperties /> | ||
| 2087 : | </filterchain> | ||
| 2088 : | </loadfile> | ||
| 2089 : | <property file="${relengCommonBuilderDir}/build.properties" /> | ||
| 2090 : | <loadfile property="server.properties.file" srcFile="${relengCommonBuilderDir}/server.properties"> | ||
| 2091 : | <filterchain> | ||
| 2092 : | <expandproperties /> | ||
| 2093 : | </filterchain> | ||
| 2094 : | </loadfile> | ||
| 2095 : | <property file="${relengCommonBuilderDir}/server.properties" /> | ||
| 2096 : | </then> | ||
| 2097 : | </if> | ||
| 2098 : | nickb | 1.23 | <echo file="${buildcfg}" append="true"> |
| 2099 : | |||
| 2100 : | ## Load ${relengBuilderDir}/build.properties ## | ||
| 2101 : | ${builder.build.properties.file} | ||
| 2102 : | |||
| 2103 : | ## Load ${relengCommonBuilderDir}/build.properties ## | ||
| 2104 : | ${common.build.properties.file} | ||
| 2105 : | |||
| 2106 : | ## Load ${relengCommonBuilderDir}/server.properties ## | ||
| 2107 : | ${server.properties.file} | ||
| 2108 : | |||
| 2109 : | </echo> | ||
| 2110 : | |||
| 2111 : | <echo file="${buildcfg}" append="true"> | ||
| 2112 : | # yet more path variables | ||
| 2113 : | baseLocation=${buildDir}/eclipse | ||
| 2114 : | testBase=${buildDir}/testing | ||
| 2115 : | |||
| 2116 : | # label.properties variables | ||
| 2117 : | buildId=${buildType}${buildTimestamp} | ||
| 2118 : | buildID=${buildType}${buildTimestamp} | ||
| 2119 : | timestamp=${buildTimestamp} | ||
| 2120 : | buildDateStamp=${buildTimestamp} | ||
| 2121 : | buildLabel=${buildType}${buildTimestamp} | ||
| 2122 : | </echo> | ||
| 2123 : | |||
| 2124 : | <if> | ||
| 2125 : | <isset property="buildAlias" /> | ||
| 2126 : | <then> | ||
| 2127 : | <echo file="${buildcfg}" append="true">buildAlias=${buildAlias}</echo> | ||
| 2128 : | </then> | ||
| 2129 : | <else> | ||
| 2130 : | <echo file="${buildcfg}" append="true">buildAlias=${buildType}${buildTimestamp}</echo> | ||
| 2131 : | </else> | ||
| 2132 : | </if> | ||
| 2133 : | </target> | ||
| 2134 : | |||
| 2135 : | <target name="collectURLs"> | ||
| 2136 : | <!-- TODO: allow override for projects that use Google Analytics to track downloads; eg., /modeling/download.php?file= --> | ||
| 2137 : | <echo file="${buildcfg}" append="true"> | ||
| 2138 : | |||
| 2139 : | #Base download URL | ||
| 2140 : | eclipse.download.url=http://www.eclipse.org/downloads/download.php?file= | ||
| 2141 : | |||
| 2142 : | </echo> | ||
| 2143 : | |||
| 2144 : | <var name="requirement.type" value="" /> | ||
| 2145 : | <var name="requirement.dropfile" value="" /> | ||
| 2146 : | <var name="required.dependency.files" value="" /> | ||
| 2147 : | |||
| 2148 : | <if> | ||
| 2149 : | nickb | 1.134 | <istrue value="${localtest}" /> |
| 2150 : | nickb | 1.23 | <then> |
| 2151 : | <!-- some sample URLs for testing; real build must pass in actual values as one long space separated string --> | ||
| 2152 : | nickb | 1.82 | |
| 2153 : | nickb | 1.23 | <property name="dependencyURLs" |
| 2154 : | value=" | ||
| 2155 : | nickb | 1.118 | http://ftp.osuosl.org/pub/eclipse/eclipse/downloads/drops/R-3.5.1-200909170800/eclipse-RCP-3.5.1-win32.zip |
| 2156 : | http://www.eclipse.org/downloads/download.php?r=1&file=/eclipse/downloads/drops/R-3.5-200906111540/eclipse-SDK-3.5-linux-gtk.tar.gz | ||
| 2157 : | nickb | 1.114 | " |
| 2158 : | /> | ||
| 2159 : | <property name="dependencyURLs" | ||
| 2160 : | value=" | ||
| 2161 : | nickb | 1.118 | ---------, |
| 2162 : | nickb | 1.114 | http://www.eclipse.org/downloads/download.php?r=1&file=/eclipse/downloads/drops/R-3.5-200906111540/eclipse-SDK-3.5-linux-gtk.tar.gz |
| 2163 : | ---------, | ||
| 2164 : | nickb | 1.99 | http://anonsvn.jboss.org/repos/repository.jboss.org/eclipse/galileo/emf-runtime-2.5.0RC2.zip, |
| 2165 : | http://anonsvn.jboss.org/repos/repository.jboss.org/eclipse/galileo/xsd-runtime-2.5.0RC2.zip, | ||
| 2166 : | http://anonsvn.jboss.org/repos/repository.jboss.org/eclipse/galileo/wtp-S-3.1RC2-20090526075706.zip, | ||
| 2167 : | nickb | 1.114 | http://anonsvn.jboss.org/repos/repository.jboss.org/eclipse/galileo/eclipse-SDK-3.5RC3-linux-gtk.tar.gz, |
| 2168 : | ---------, | ||
| 2169 : | http://repository.jboss.org/eclipse/galileo/eclipse-SDK-3.5-linux-gtk.tar.gz, | ||
| 2170 : | http://repository.jboss.org/eclipse/galileo/GEF-runtime-3.5.0.zip, | ||
| 2171 : | nickb | 1.99 | ---------, |
| 2172 : | nickb | 1.82 | ftp://ftp.ussg.iu.edu/pub/eclipse/eclipse/downloads/drops/S-3.5M7-200904302300/eclipse-SDK-3.5M7-linux-gtk.tar.gz, |
| 2173 : | http://download.eclipse.org/eclipse/downloads/drops/R-3.4.1-200809111700/eclipse-SDK-3.4.1-linux-gtk.tar.gz, | ||
| 2174 : | ---------, | ||
| 2175 : | http://ftp.ussg.iu.edu/eclipse/modeling/emf/emf/downloads/drops/2.5.0/S200905041408/emf-runtime-2.5.0M7.zip, | ||
| 2176 : | http://download.eclipse.org/modeling/emf/emf/downloads/drops/2.4.1/R200808251517/emf-runtime-2.4.1.zip, | ||
| 2177 : | ---------, | ||
| 2178 : | http://ftp.ussg.iu.edu/eclipse/modeling/emf/emf/downloads/drops/2.5.0/S200905041408/xsd-runtime-2.5.0M7.zip, | ||
| 2179 : | http://download.eclipse.org/modeling/emf/emf/downloads/drops/2.4.1/R200808251517/xsd-runtime-2.4.1.zip, | ||
| 2180 : | ---------, | ||
| 2181 : | http://ftp.ussg.iu.edu/eclipse/tools/gef/downloads/drops/3.5.0/S200905011522/GEF-SDK-3.5.0M7.zip, | ||
| 2182 : | http://download.eclipse.org/tools/gef/downloads/drops/3.4.1/R200809101400/GEF-SDK-3.4.1.zip, | ||
| 2183 : | ---------, | ||
| 2184 : | http://ftp.ussg.iu.edu/eclipse/webtools/downloads/drops/R3.1/S-3.1M7-20090505073946/wtp-wst-sdk-S-3.1M7-20090505073946.zip, | ||
| 2185 : | http://download.eclipse.org/webtools/downloads/drops/R3.0/R-3.0.3-20081113203138/wtp-wst-sdk-R-3.0.3-20081113203138.zip, | ||
| 2186 : | ---------, | ||
| 2187 : | http://www.eclipse.org/downloads/download.php?r=1&file=/eclipse/downloads/drops/S-3.5M7-200904302300/eclipse-SDK-3.5M7-linux-gtk.tar.gz, | ||
| 2188 : | ---------, | ||
| 2189 : | nickb | 1.23 | http://download.eclipse.org/eclipse/downloads/drops/R-3.4-200806172000/eclipse-SDK-3.4.1-linux-gtk-ppc.tar.gz, |
| 2190 : | http://download.eclipse.org/eclipse/downloads/drops/R-3.4.1-200809111700/eclipse-SDK-3.4.1-linux-gtk.tar.gz, | ||
| 2191 : | nickb | 1.60 | http://download.eclipse.org/eclipse/downloads/drops/R-3.4.2-200902111700/eclipse-platform-3.4.2-win32.zip, |
| 2192 : | http://download.eclipse.org/eclipse/downloads/drops/R-3.4.2-200902111700/swt-3.4.2-win32-win32-x86.zip, | ||
| 2193 : | nickb | 1.82 | ---------, |
| 2194 : | nickb | 1.23 | http://www.eclipse.org/modeling/download.php?file=/modeling/emf/emf/downloads/drops/2.5.0/S200902031500/emf-xsd-SDK-2.5.0M5.zip, |
| 2195 : | http://download.eclipse.org/modeling/emf/emf/downloads/drops/2.4.0/R200806091234/emf-sdo-xsd-Examples-2.4.0.zip, | ||
| 2196 : | http://download.eclipse.org/modeling/emf/emf/downloads/drops/2.4.1/R200808251517/emf-runtime-2.4.1.zip, | ||
| 2197 : | http://download.eclipse.org/modeling/emf/emf/downloads/drops/2.4.1/R200808251517/xsd-runtime-2.4.1.zip, | ||
| 2198 : | nickb | 1.82 | ---------, |
| 2199 : | nickb | 1.23 | http://download.eclipse.org/tools/gef/downloads/drops/3.4.1/R200809101400/GEF-runtime-3.4.1.zip, |
| 2200 : | nickb | 1.82 | ---------, |
| 2201 : | nickb | 1.23 | http://download.eclipse.org/modeling/mdt/uml2/downloads/drops/2.2.0/R200806091546/mdt-uml2-SDK-2.2.0.zip, |
| 2202 : | http://download.eclipse.org/modeling/mdt/ocl/downloads/drops/1.2.0/R200806091714/mdt-ocl-SDK-1.2.0.zip, | ||
| 2203 : | http://download.eclipse.org/modeling/emf/validation/downloads/drops/1.2.0/R200806091804/emf-validation-SDK-1.2.0.zip, | ||
| 2204 : | nickb | 1.82 | ---------, |
| 2205 : | nickb | 1.23 | http://download.eclipse.org/webtools/downloads/drops/R3.0/R-3.0.3-20081113203138/wtp-wst-R-3.0.3-20081113203138.zip, |
| 2206 : | nickb | 1.82 | http://download.eclipse.org/webtools/downloads/drops/R3.0/R-3.0.4-20090213193639/wtp-jst-R-3.0.4-20090213193639.zip, |
| 2207 : | http://download.eclipse.org/webtools/downloads/drops/R3.0/R-3.0.4-20090213193639/wtp-jst-Automated-Tests-R-3.0.4-20090213193639.zip, | ||
| 2208 : | ---------, | ||
| 2209 : | nickb | 1.23 | http://download.eclipse.org/technology/dltk/downloads/drops/R1.0/S-1.0M4-200812290249/dltk-rse-S-1.0M4-200812290249-incubation.zip, |
| 2210 : | http://download.eclipse.org/technology/dltk/downloads/drops/R1.0/S-1.0M4-200812290249/dltk-core-S-1.0M4-200812290249-incubation.zip, | ||
| 2211 : | nickb | 1.82 | ---------, |
| 2212 : | nickb | 1.23 | http://download.eclipse.org/tools/orbit/downloads/drops/R20080611105805/orbitBundles-R20080611105805.map, |
| 2213 : | nickb | 1.82 | http://download.eclipse.org/tools/cdt/releases/ganymede/dist/cdt-master-5.0.0.zip, |
| 2214 : | ---------, | ||
| 2215 : | nickb | 1.23 | http://download.eclipse.org/eclipse/downloads/drops/R-3.4-200806172000/eclipse-SDK-3.4.1-linux-gtk-ppc.tar.gz, |
| 2216 : | nickb | 1.82 | http://download.eclipse.org/tools/cdt/releases/ganymede/dist/cdt-master-5.0.0.zip, |
| 2217 : | ---------, | ||
| 2218 : | nickb | 1.23 | http://download.eclipse.org/eclipse/downloads/drops/S-3.5M5-200902021535/eclipse-SDK-3.5M5-linux-gtk-ppc.tar.gz |
| 2219 : | nickb | 1.82 | http://download.eclipse.org/tools/cdt/builds/6.0.0/I.I200902031437/cdt-master-6.0.0-I200902031437.zip, |
| 2220 : | http://download.eclipse.org/birt/downloads/drops/M-R1-2.5M5-200902101827/birt-report-framework-2.5M5.zip, | ||
| 2221 : | http://download.eclipse.org/modeling/emf/emf/downloads/drops/2.5.0/S200902031500/emf-runtime-2.5.0M5.zip, | ||
| 2222 : | nickb | 1.23 | " |
| 2223 : | /> | ||
| 2224 : | </then> | ||
| 2225 : | |||
| 2226 : | <elseif> | ||
| 2227 : | <not> | ||
| 2228 : | <!-- commandline --> | ||
| 2229 : | <isset property="dependencyURLs" /> | ||
| 2230 : | </not> | ||
| 2231 : | <then> | ||
| 2232 : | <!-- load defined values in project's build.properties --> | ||
| 2233 : | <property file="${relengBuilderDir}/build.properties" /> | ||
| 2234 : | </then> | ||
| 2235 : | </elseif> | ||
| 2236 : | </if> | ||
| 2237 : | |||
| 2238 : | <var name="numURLs" value="0" /> | ||
| 2239 : | nickb | 1.111 | <property name="dependencyURLs" value="" /> |
| 2240 : | nickb | 1.23 | <for param="URL" list="${dependencyURLs}" delimiter=", "> |
| 2241 : | <!-- check each URL to determine what type of req it is, and collect variables --> | ||
| 2242 : | <sequential> | ||
| 2243 : | <if> | ||
| 2244 : | nickb | 1.134 | <istrue value="${localtest}" /> |
| 2245 : | nickb | 1.23 | <then> |
| 2246 : | nickb | 1.82 | <echo>@{URL}</echo> |
| 2247 : | nickb | 1.23 | </then> |
| 2248 : | </if> | ||
| 2249 : | nickb | 1.82 | <if> |
| 2250 : | <not> | ||
| 2251 : | <equals arg1="@{URL}" arg2="---------" /> | ||
| 2252 : | </not> | ||
| 2253 : | <then> | ||
| 2254 : | |||
| 2255 : | <!-- trim off everything before ?file=/ and hostname --> | ||
| 2256 : | <propertyregex property="requirement.dropfile" | ||
| 2257 : | defaultvalue="@{URL}" | ||
| 2258 : | input="@{URL}" | ||
| 2259 : | casesensitive="false" | ||
| 2260 : | regexp="((.+\?file=/|.+\&file=/|.+\&amp;file=/|.+/pub/)|(.+://[^/]+/))(.+)" | ||
| 2261 : | replace="\4" | ||
| 2262 : | override="true" | ||
| 2263 : | /> | ||
| 2264 : | <!-- remove downloads/drops/version/buildID & file suffix, --> | ||
| 2265 : | <propertyregex property="requirement.type.tmp" | ||
| 2266 : | defaultvalue="${requirement.dropfile}" | ||
| 2267 : | input="${requirement.dropfile}" | ||
| 2268 : | casesensitive="true" | ||
| 2269 : | regexp="(.+)(/downloads/drops/.+/|/releases/.+/|/builds/.+/)([^/]+)" | ||
| 2270 : | select="\1-\3" | ||
| 2271 : | override="true" | ||
| 2272 : | /> | ||
| 2273 : | nickb | 1.23 | |
| 2274 : | nickb | 1.82 | <!-- <echo>0 ${requirement.type.tmp}</echo> --> |
| 2275 : | <!-- extra cleanup for WTP, DLTK, CDT --> | ||
| 2276 : | <propertyregex property="requirement.type.tmp" | ||
| 2277 : | defaultvalue="${requirement.type.tmp}" | ||
| 2278 : | input="${requirement.type.tmp}" | ||
| 2279 : | casesensitive="true" | ||
| 2280 : | regexp="(.+)-([\d\.NIMSR-]+).+" | ||
| 2281 : | select="\1" | ||
| 2282 : | override="true" | ||
| 2283 : | /> | ||
| 2284 : | <!-- <echo>1 ${requirement.type.tmp}</echo> --> | ||
| 2285 : | nickb | 1.23 | <if> |
| 2286 : | nickb | 1.118 | <or> |
| 2287 : | <contains string="${requirement.type.tmp}" substring="-RCP" casesensitive="false" /> | ||
| 2288 : | <contains string="${requirement.type.tmp}" substring="-platform" casesensitive="false" /> | ||
| 2289 : | <contains string="${requirement.type.tmp}" substring="-SDK" casesensitive="false" /> | ||
| 2290 : | </or> | ||
| 2291 : | nickb | 1.23 | <then> |
| 2292 : | nickb | 1.118 | <var name="requirement.type.suffix" value=".base" /> |
| 2293 : | nickb | 1.23 | </then> |
| 2294 : | </if> | ||
| 2295 : | nickb | 1.82 | |
| 2296 : | <propertyregex property="requirement.type.tmp" | ||
| 2297 : | defaultvalue="${requirement.type.tmp}" | ||
| 2298 : | input="${requirement.type.tmp}" | ||
| 2299 : | casesensitive="true" | ||
| 2300 : | regexp="(.+)-([\d\.NIMSR-]+)" | ||
| 2301 : | select="\1" | ||
| 2302 : | override="true" | ||
| 2303 : | /> | ||
| 2304 : | <!-- <echo>2 ${requirement.type.tmp}</echo> --> | ||
| 2305 : | <propertyregex property="requirement.type.tmp" | ||
| 2306 : | defaultvalue="${requirement.type.tmp}" | ||
| 2307 : | input="${requirement.type.tmp}" | ||
| 2308 : | casesensitive="true" | ||
| 2309 : | regexp="(.+)-([\d\.NIMSR]+)" | ||
| 2310 : | select="\1" | ||
| 2311 : | override="true" | ||
| 2312 : | /> | ||
| 2313 : | <!-- <echo>3 ${requirement.type.tmp}</echo> --> | ||
| 2314 : | <!-- switch / and - to . --> | ||
| 2315 : | <propertyregex property="requirement.type.tmp" | ||
| 2316 : | defaultvalue="${requirement.type.tmp}" | ||
| 2317 : | input="${requirement.type.tmp}" | ||
| 2318 : | casesensitive="false" | ||
| 2319 : | regexp="[/-]+" | ||
| 2320 : | replace="\." | ||
| 2321 : | override="true" | ||
| 2322 : | /> | ||
| 2323 : | nickb | 1.102 | <!-- <echo>4 ${requirement.type.tmp}</echo> --> |
| 2324 : | nickb | 1.101 | <!-- trim prefix "repos.repository.jboss.org.eclipse.galileo." --> |
| 2325 : | nickb | 1.99 | <propertyregex property="requirement.type.tmp" |
| 2326 : | defaultvalue="${requirement.type.tmp}" | ||
| 2327 : | input="${requirement.type.tmp}" | ||
| 2328 : | casesensitive="" | ||
| 2329 : | nickb | 1.114 | regexp="(repos\.repository\.jboss\.org\.eclipse\.galileo|eclipse\.galileo)\.(.+)" |
| 2330 : | replace="\2" | ||
| 2331 : | nickb | 1.99 | override="true" |
| 2332 : | /> | ||
| 2333 : | nickb | 1.102 | <!-- <echo>5 ${requirement.type.tmp}</echo> --> |
| 2334 : | nickb | 1.82 | <!-- trim prefix "eclipse." --> |
| 2335 : | <propertyregex property="requirement.type.tmp" | ||
| 2336 : | defaultvalue="${requirement.type.tmp}" | ||
| 2337 : | input="${requirement.type.tmp}" | ||
| 2338 : | casesensitive="" | ||
| 2339 : | regexp="eclipse\.(.+)" | ||
| 2340 : | replace="\1" | ||
| 2341 : | override="true" | ||
| 2342 : | /> | ||
| 2343 : | <!-- dedupe: eclipse.eclipse.SDK ==> eclipse.SDK; modeling.emf.emf.emf.xsd.SDK ==> modeling.emf.xsd.SDK --> | ||
| 2344 : | <var name="requirement.type" value="" /> | ||
| 2345 : | <for param="bit" list="${requirement.type.tmp}" delimiter="."> | ||
| 2346 : | <sequential> | ||
| 2347 : | <if> | ||
| 2348 : | <not> | ||
| 2349 : | <contains string="${requirement.type}" substring="@{bit}" casesensitive="false" /> | ||
| 2350 : | </not> | ||
| 2351 : | <then> | ||
| 2352 : | <var name="requirement.type" value="${requirement.type}.@{bit}" /> | ||
| 2353 : | </then> | ||
| 2354 : | </if> | ||
| 2355 : | </sequential> | ||
| 2356 : | </for> | ||
| 2357 : | <!-- trim prefix "." --> | ||
| 2358 : | nickb | 1.23 | <propertyregex property="requirement.type" |
| 2359 : | defaultvalue="${requirement.type}" | ||
| 2360 : | input="${requirement.type}" | ||
| 2361 : | casesensitive="" | ||
| 2362 : | nickb | 1.82 | regexp="\.(.+)" |
| 2363 : | replace="\1" | ||
| 2364 : | nickb | 1.23 | override="true" |
| 2365 : | /> | ||
| 2366 : | nickb | 1.82 | <!-- add suffix --> |
| 2367 : | <if> | ||
| 2368 : | <isset property="requirement.type.suffix" /> | ||
| 2369 : | <then> | ||
| 2370 : | <propertyregex property="requirement.type" | ||
| 2371 : | defaultvalue="${requirement.type}" | ||
| 2372 : | input="${requirement.type}" | ||
| 2373 : | casesensitive="" | ||
| 2374 : | regexp="(.+)" | ||
| 2375 : | replace="\1${requirement.type.suffix}" | ||
| 2376 : | override="true" | ||
| 2377 : | /> | ||
| 2378 : | </then> | ||
| 2379 : | </if> | ||
| 2380 : | nickb | 1.23 | |
| 2381 : | nickb | 1.82 | <propertyregex property="requirement.file" |
| 2382 : | defaultvalue="@{URL}" | ||
| 2383 : | input="@{URL}" | ||
| 2384 : | casesensitive="" | ||
| 2385 : | regexp=".+/([^\/]+)" | ||
| 2386 : | replace="\1" | ||
| 2387 : | override="true" | ||
| 2388 : | /> | ||
| 2389 : | <propertyregex property="requirement.dir" | ||
| 2390 : | defaultvalue="@{URL}" | ||
| 2391 : | input="@{URL}" | ||
| 2392 : | casesensitive="" | ||
| 2393 : | regexp=".+/([^\/]+)" | ||
| 2394 : | replace="\1" | ||
| 2395 : | override="true" | ||
| 2396 : | /> | ||
| 2397 : | <propertyregex property="requirement.buildurl" | ||
| 2398 : | defaultvalue="${requirement.dropfile}" | ||
| 2399 : | input="${requirement.dropfile}" | ||
| 2400 : | casesensitive="" | ||
| 2401 : | regexp="(.+)/([^\/]+)" | ||
| 2402 : | replace="\1" | ||
| 2403 : | override="true" | ||
| 2404 : | /> | ||
| 2405 : | nickb | 1.23 | |
| 2406 : | nickb | 1.82 | <!-- define list of dependency files for use with buildAllHelper.xml#packAllInOnes; csv list called ${required.dependency.files} --> |
| 2407 : | <if> | ||
| 2408 : | <not> | ||
| 2409 : | <contains string="${required.dependency.files}" substring="${requirement.file}" casesensitive="true" /> | ||
| 2410 : | </not> | ||
| 2411 : | <then> | ||
| 2412 : | <var name="required.dependency.files" value="${required.dependency.files},${requirement.file}" /> | ||
| 2413 : | </then> | ||
| 2414 : | </if> | ||
| 2415 : | <if> | ||
| 2416 : | <equals arg1="${debug}" arg2="true" /> | ||
| 2417 : | <then> | ||
| 2418 : | <echo># ${requirement.type}</echo> | ||
| 2419 : | </then> | ||
| 2420 : | </if> | ||
| 2421 : | nickb | 1.23 | |
| 2422 : | nickb | 1.82 | <echo file="${buildcfg}" append="true"> |
| 2423 : | nickb | 1.23 | # ${requirement.type} |
| 2424 : | ${requirement.type}.url=@{URL} | ||
| 2425 : | ${requirement.type}.file=${requirement.file} | ||
| 2426 : | ${requirement.type}.dropfile=/${requirement.dropfile} | ||
| 2427 : | ${requirement.type}.buildurl=/${requirement.buildurl} | ||
| 2428 : | |||
| 2429 : | </echo> | ||
| 2430 : | nickb | 1.82 | <if> |
| 2431 : | <equals arg1="${downloadZipsIfNotFound}" arg2="true" /> | ||
| 2432 : | <then> | ||
| 2433 : | <antcall target="getZip"> | ||
| 2434 : | <param name="downloadsDir" value="${downloadsDir}" /> | ||
| 2435 : | <param name="theFile" value="${requirement.file}" /> | ||
| 2436 : | <param name="theURL" value="@{URL}" /> | ||
| 2437 : | </antcall> | ||
| 2438 : | </then> | ||
| 2439 : | </if> | ||
| 2440 : | <var name="requirement.type.suffix" unset="true" /> | ||
| 2441 : | |||
| 2442 : | <math result="numURLs" operand1="${numURLs}" operation="+" operand2="1" datatype="int" /> | ||
| 2443 : | nickb | 1.23 | </then> |
| 2444 : | </if> | ||
| 2445 : | </sequential> | ||
| 2446 : | </for> | ||
| 2447 : | |||
| 2448 : | <!-- define list of dependency files for use with buildAllHelper.xml#packAllInOnes; csv list called ${required.dependency.files} --> | ||
| 2449 : | <!-- trim prefix "," --> | ||
| 2450 : | <propertyregex property="required.dependency.files" | ||
| 2451 : | defaultvalue="${required.dependency.files}" | ||
| 2452 : | input="${required.dependency.files}" | ||
| 2453 : | regexp=",(.+)" | ||
| 2454 : | replace="\1" | ||
| 2455 : | override="true" | ||
| 2456 : | /> | ||
| 2457 : | <echo file="${buildcfg}" append="true"> | ||
| 2458 : | #csv list of ${numURLs} required dependency files: see buildAllHelper.xml#packAllInOnes | ||
| 2459 : | required.dependency.files=${required.dependency.files} | ||
| 2460 : | </echo> | ||
| 2461 : | |||
| 2462 : | <!-- for debugging use only --> | ||
| 2463 : | <if> | ||
| 2464 : | <equals arg1="${debug}" arg2="true" /> | ||
| 2465 : | <then> | ||
| 2466 : | <exec executable="cat"> | ||
| 2467 : | <arg line="${buildcfg}" /> | ||
| 2468 : | </exec> | ||
| 2469 : | </then> | ||
| 2470 : | </if> | ||
| 2471 : | |||
| 2472 : | </target> | ||
| 2473 : | |||
| 2474 : | nickb | 1.107 | <!-- scan through the map files and decide what type of maps will be used by the build --> |
| 2475 : | <target name="collectMapTypes"> | ||
| 2476 : | <if> | ||
| 2477 : | <isset property="localSourceCheckoutDir" /> | ||
| 2478 : | <then> | ||
| 2479 : | <property name="mapTypes" value="local" /> | ||
| 2480 : | </then> | ||
| 2481 : | <else> | ||
| 2482 : | <var name="mapTypes" value="" /> | ||
| 2483 : | <for param="file"> | ||
| 2484 : | <path> | ||
| 2485 : | <fileset dir="${relengBuilderDir}/maps" includes="*.map" /> | ||
| 2486 : | </path> | ||
| 2487 : | <sequential> | ||
| 2488 : | <var name="map.file" unset="true" /> | ||
| 2489 : | <loadfile property="map.file" srcfile="@{file}" /> | ||
| 2490 : | <if> | ||
| 2491 : | <contains string="${map.file}" substring="=SVN," casesensitive="false" /> | ||
| 2492 : | <then> | ||
| 2493 : | <if> | ||
| 2494 : | <not> | ||
| 2495 : | <contains string="${mapTypes}" substring="SVN" /> | ||
| 2496 : | </not> | ||
| 2497 : | <then> | ||
| 2498 : | <var name="mapTypes" value="${mapTypes},SVN" /> | ||
| 2499 : | </then> | ||
| 2500 : | </if> | ||
| 2501 : | </then> | ||
| 2502 : | </if> | ||
| 2503 : | <if> | ||
| 2504 : | <contains string="${map.file}" substring="=GET," /> | ||
| 2505 : | <then> | ||
| 2506 : | <if> | ||
| 2507 : | <not> | ||
| 2508 : | <contains string="${mapTypes}" substring="GET" /> | ||
| 2509 : | </not> | ||
| 2510 : | <then> | ||
| 2511 : | <var name="mapTypes" value="${mapTypes},GET" /> | ||
| 2512 : | </then> | ||
| 2513 : | </if> | ||
| 2514 : | </then> | ||
| 2515 : | </if> | ||
| 2516 : | <if> | ||
| 2517 : | <contains string="${map.file}" substring="cvs" /> | ||
| 2518 : | <then> | ||
| 2519 : | <if> | ||
| 2520 : | <not> | ||
| 2521 : | <contains string="${mapTypes}" substring="CVS" /> | ||
| 2522 : | </not> | ||
| 2523 : | <then> | ||
| 2524 : | <var name="mapTypes" value="${mapTypes},CVS" /> | ||
| 2525 : | </then> | ||
| 2526 : | </if> | ||
| 2527 : | </then> | ||
| 2528 : | |||
| 2529 : | </if> | ||
| 2530 : | <var name="map.file" unset="true" /> | ||
| 2531 : | </sequential> | ||
| 2532 : | </for> | ||
| 2533 : | nickb | 1.108 | |
| 2534 : | nickb | 1.107 | <!-- trim prefix "," --> |
| 2535 : | nickb | 1.108 | <propertyregex property="mapTypes" defaultvalue="${mapTypes}" input="${mapTypes}" regexp=",(.+)" replace="\1" override="true" /> |
| 2536 : | nickb | 1.107 | </else> |
| 2537 : | </if> | ||
| 2538 : | nickb | 1.108 | |
| 2539 : | nickb | 1.107 | <echo file="${buildcfg}" append="true"> |
| 2540 : | |||
| 2541 : | # map types used in this build (CVS, SVN, GET, local) | ||
| 2542 : | mapTypes=${mapTypes}</echo> | ||
| 2543 : | </target> | ||
| 2544 : | |||
| 2545 : | nickb | 1.23 | <target name="projectid2names" description="Calculate *projectName variables from projectid"> |
| 2546 : | <propertyregex property="topprojectName" | ||
| 2547 : | defaultvalue="${topprojectName}" | ||
| 2548 : | input="${projectid}" | ||
| 2549 : | casesensitive="" | ||
| 2550 : | regexp="([^\.]+)\..+" | ||
| 2551 : | replace="\1" | ||
| 2552 : | override="true" | ||
| 2553 : | /> | ||
| 2554 : | <propertyregex property="subprojectName" | ||
| 2555 : | defaultvalue="${subprojectName}" | ||
| 2556 : | input="${projectid}" | ||
| 2557 : | casesensitive="" | ||
| 2558 : | regexp=".+\.([^\.]+)" | ||
| 2559 : | replace="\1" | ||
| 2560 : | override="true" | ||
| 2561 : | /> | ||
| 2562 : | <!-- projectName is either the middle piece if this regex matches, or ${subprojectName} if it doesn't --> | ||
| 2563 : | <propertyregex property="projectName" | ||
| 2564 : | defaultvalue="${subprojectName}" | ||
| 2565 : | input="${projectid}" | ||
| 2566 : | casesensitive="" | ||
| 2567 : | regexp=".+\.([^\.]+)\..+" | ||
| 2568 : | replace="\1" | ||
| 2569 : | override="true" | ||
| 2570 : | /> | ||
| 2571 : | </target> | ||
| 2572 : | |||
| 2573 : | <target name="getZip"> | ||
| 2574 : | <if> | ||
| 2575 : | <not> | ||
| 2576 : | <available file="${downloadsDir}/${theFile}" /> | ||
| 2577 : | </not> | ||
| 2578 : | <then> | ||
| 2579 : | nickb | 1.30 | <mkdir dir="${downloadsDir}" /> |
| 2580 : | nickb | 1.23 | <get src="${theURL}" dest="${downloadsDir}/${theFile}" usetimestamp="true" /> |
| 2581 : | </then> | ||
| 2582 : | </if> | ||
| 2583 : | <touch file="${downloadsDir}/${theFile}" /> | ||
| 2584 : | </target> | ||
| 2585 : | |||
| 2586 : | nickb | 1.89 | <!-- TODO: support projectSetFiles = a dir, a file, or a CSV list of files --> |
| 2587 : | <target name="fetchFromProjectSetFiles"> | ||
| 2588 : | |||
| 2589 : | <echo>projectSetFiles = ${projectSetFiles}</echo> | ||
| 2590 : | <for param="psfEntry" delimiter=", " list="${projectSetFiles}"> | ||
| 2591 : | <sequential> | ||
| 2592 : | <if> | ||
| 2593 : | <available file="@{psfEntry}" type="file" /> | ||
| 2594 : | <then> | ||
| 2595 : | <!-- load .psf into ${buildDirectory}/plugins/ and ${buildDirectory/features/ --> | ||
| 2596 : | <echo>load @{psfEntry}</echo> | ||
| 2597 : | |||
| 2598 : | <mkdir dir="${buildDir}/psf-checkout" /> | ||
| 2599 : | <!-- determine if file is cvs or svn --> | ||
| 2600 : | nickb | 1.91 | |
| 2601 : | nickb | 1.89 | <!-- do checkout using latest ant4eclipse --> |
| 2602 : | <!-- | ||
| 2603 : | <cvsGetProjectSet cvsreallyquiet="true" | ||
| 2604 : | cvsUser="anonymous" cvsPwd="" | ||
| 2605 : | command="checkout" | ||
| 2606 : | projectSet="@{psfEntry}" workspace="${buildDir}/psf-checkout" /> | ||
| 2607 : | <svnGetProjectSet command="checkout" workspace="${buildDir}/psf-checkout" | ||
| 2608 : | projectset="@{psfEntry}" /> | ||
| 2609 : | --> | ||
| 2610 : | nickb | 1.91 | |
| 2611 : | nickb | 1.89 | <!-- set localsourcecheckoutdir = ${buildDir}/psf-checkout, and do --> |
| 2612 : | </then> | ||
| 2613 : | <elseif> | ||
| 2614 : | <available file="@{psfEntry}" type="dir" /> | ||
| 2615 : | <then> | ||
| 2616 : | <!-- load all .psfs in dir into ${buildDirectory}/plugins/ and ${buildDirectory/features/ --> | ||
| 2617 : | nickb | 1.91 | <echo>load all .psfs in dir @{psfEntry}</echo> |
| 2618 : | nickb | 1.89 | </then> |
| 2619 : | </elseif> | ||
| 2620 : | </if> | ||
| 2621 : | </sequential> | ||
| 2622 : | </for> | ||
| 2623 : | |||
| 2624 : | |||
| 2625 : | <fail /> | ||
| 2626 : | </target> | ||
| 2627 : | |||
| 2628 : | nickb | 1.133 | <target name="fetchEclipseTestFrameworkSources"> |
| 2629 : | <!-- get missing o.e.test and o.e.a.o.junit if missing --> | ||
| 2630 : | <for param="bundle" list="plugin@org.eclipse.test,fragment@org.eclipse.ant.optional.junit" keepgoing="true"> | ||
| 2631 : | <sequential> | ||
| 2632 : | <propertyregex property="bundleName" input="@{bundle}" regexp="([^@]+)@([^@]+)" select="\2" casesensitive="false" override="true" /> | ||
| 2633 : | <if> | ||
| 2634 : | <not> | ||
| 2635 : | <available file="${buildDir}/eclipse/plugins/${bundleName}" type="dir" /> | ||
| 2636 : | </not> | ||
| 2637 : | <then> | ||
| 2638 : | <!-- fetch two test plugins from cvs via psf file --> | ||
| 2639 : | <mkdir dir="${localSourceCheckoutDir}/test-temp" /> | ||
| 2640 : | <cvsGetProjectSet cvsUser="anonymous" | ||
| 2641 : | CvsPwd="" | ||
| 2642 : | command="checkout" | ||
| 2643 : | projectSet="${relengCommonBuilderDir}/psf/test.psf" | ||
| 2644 : | workspace="${localSourceCheckoutDir}/test-temp" | ||
| 2645 : | /> | ||
| 2646 : | |||
| 2647 : | <!-- copy plugins to where they're needed for the build --> | ||
| 2648 : | <copy todir="${buildDir}/eclipse/plugins"> | ||
| 2649 : | <fileset dir="${localSourceCheckoutDir}/test-temp" /> | ||
| 2650 : | </copy> | ||
| 2651 : | |||
| 2652 : | <!-- cache them for next time --> | ||
| 2653 : | <mkdir dir="${localSourceCheckoutDir}/test" /> | ||
| 2654 : | <copy todir="${localSourceCheckoutDir}/test"> | ||
| 2655 : | <fileset dir="${localSourceCheckoutDir}/test-temp" /> | ||
| 2656 : | </copy> | ||
| 2657 : | |||
| 2658 : | <!-- cleanup --> | ||
| 2659 : | <delete dir="${localSourceCheckoutDir}/test-temp" includeemptydirs="true" quiet="true" /> | ||
| 2660 : | </then> | ||
| 2661 : | </if> | ||
| 2662 : | <var name="bundleName" unset="true" /> | ||
| 2663 : | </sequential> | ||
| 2664 : | </for> | ||
| 2665 : | |||
| 2666 : | <!-- check again; this time fail if not found --> | ||
| 2667 : | <for param="bundle" list="plugin@org.eclipse.test,fragment@org.eclipse.ant.optional.junit" keepgoing="false"> | ||
| 2668 : | <sequential> | ||
| 2669 : | <propertyregex property="bundleName" input="@{bundle}" regexp="([^@]+)@([^@]+)" select="\2" casesensitive="false" override="true" /> | ||
| 2670 : | <if> | ||
| 2671 : | <not> | ||
| 2672 : | <available file="${buildDir}/eclipse/plugins/${bundleName}" type="dir" /> | ||
| 2673 : | </not> | ||
| 2674 : | <then> | ||
| 2675 : | <echo message="ERROR! Can't find @{bundle} in ${buildDir}/eclipse/plugins/${bundleName}. Make sure your locally cached sources include this bundle." | ||
| 2676 : | /> | ||
| 2677 : | </then> | ||
| 2678 : | </if> | ||
| 2679 : | <var name="bundleName" unset="true" /> | ||
| 2680 : | </sequential> | ||
| 2681 : | </for> | ||
| 2682 : | </target> | ||
| 2683 : | |||
| 2684 : | nickb | 1.84 | <!-- from a vcs raw dump, create a zip collecting everything into features/ and plugins/ so PDE can build it --> |
| 2685 : | <target name="convertRawCheckoutToFeaturesAndPluginsDirs" depends="init"> | ||
| 2686 : | <property name="localSourceCheckoutDir" value="/home/nboldt/eclipse/workspace-jboss/org.eclipse.linuxtools.tree" /> | ||
| 2687 : | |||
| 2688 : | <!-- could be set to ${buildDirectory} if copying sources into a build-in-progress --> | ||
| 2689 : | <property name="targetDir" value="${localSourceCheckoutDir}/ztmpDir" /> | ||
| 2690 : | |||
| 2691 : | <!-- set to false to include .svn folders and other metadata --> | ||
| 2692 : | nickb | 1.88 | <property name="defaultExcludes" value="true" /> |
| 2693 : | nickb | 1.84 | |
| 2694 : | <mkdir dir="${targetDir}/features" /> | ||
| 2695 : | <mkdir dir="${targetDir}/plugins" /> | ||
| 2696 : | <for param="dir"> | ||
| 2697 : | <path> | ||
| 2698 : | <!-- Use "localSourceCheckoutDirExcludes" in build.properties to define what to suppress from the VCS dump; eg., "/archive/" should be ignored in gef.tree --> | ||
| 2699 : | nickb | 1.88 | <dirset dir="${localSourceCheckoutDir}" |
| 2700 : | includes="**/**, **/**/**, **/**/**/**" | ||
| 2701 : | excludes="ztmpDir, ${localSourceCheckoutDirExcludes}" | ||
| 2702 : | /> | ||
| 2703 : | nickb | 1.84 | </path> |
| 2704 : | <sequential> | ||
| 2705 : | <if> | ||
| 2706 : | nickb | 1.96 | <not> |
| 2707 : | <or> | ||
| 2708 : | <!-- exclude paths which might be in the workspace which are NOT relevant here --> | ||
| 2709 : | <contains string="@{dir}" substring=".metadata" /> | ||
| 2710 : | <contains string="@{dir}" substring="org.eclipse.releng.basebuilder" /> | ||
| 2711 : | <contains string="@{dir}" substring="org.eclipse.dash.common.releng" /> | ||
| 2712 : | </or> | ||
| 2713 : | </not> | ||
| 2714 : | nickb | 1.84 | <then> |
| 2715 : | nickb | 1.96 | <var name="dir.flat" unset="true" /> |
| 2716 : | <!-- flatten path to get just the dir --> | ||
| 2717 : | <basename property="dir.flat" file="@{dir}" /> | ||
| 2718 : | <!-- trim the "-feature" dir suffix off since we assume the featureid does not include it --> | ||
| 2719 : | <propertyregex property="dir.flat" | ||
| 2720 : | defaultvalue="${dir.flat}" | ||
| 2721 : | input="${dir.flat}" | ||
| 2722 : | regexp="([^/\\]+)-feature" | ||
| 2723 : | replace="\1" | ||
| 2724 : | override="true" | ||
| 2725 : | /> | ||
| 2726 : | <if> | ||
| 2727 : | <available file="@{dir}/feature.xml" type="file" /> | ||
| 2728 : | <then> | ||
| 2729 : | <!-- <echo>Feature :: ${dir.flat} :: @{dir}</echo> --> | ||
| 2730 : | <mkdir dir="${targetDir}/features/${dir.flat}" /> | ||
| 2731 : | <copy todir="${targetDir}/features/${dir.flat}"> | ||
| 2732 : | <fileset dir="@{dir}" includes="**" defaultexcludes="${defaultExcludes}" /> | ||
| 2733 : | </copy> | ||
| 2734 : | </then> | ||
| 2735 : | <elseif> | ||
| 2736 : | <or> | ||
| 2737 : | <available file="@{dir}/META-INF/MANIFEST.MF" type="file" /> | ||
| 2738 : | <available file="@{dir}/plugin.xml" type="file" /> | ||
| 2739 : | <available file="@{dir}/fragment.xml" type="file" /> | ||
| 2740 : | </or> | ||
| 2741 : | <then> | ||
| 2742 : | <!-- <echo>Plugin :: ${dir.flat} :: @{dir}</echo> --> | ||
| 2743 : | <mkdir dir="${targetDir}/plugins/${dir.flat}" /> | ||
| 2744 : | <copy todir="${targetDir}/plugins/${dir.flat}"> | ||
| 2745 : | <fileset dir="@{dir}" includes="**" defaultexcludes="${defaultExcludes}" /> | ||
| 2746 : | </copy> | ||
| 2747 : | </then> | ||
| 2748 : | </elseif> | ||
| 2749 : | <elseif> | ||
| 2750 : | <or> | ||
| 2751 : | <contains string="${dir.flat}" substring=".releng" /> | ||
| 2752 : | <contains string="${dir.flat}" substring=".updatesite" /> | ||
| 2753 : | <contains string="${dir.flat}" substring=".update-site" /> | ||
| 2754 : | <contains string="${dir.flat}" substring=".updates" /> | ||
| 2755 : | </or> | ||
| 2756 : | <then> | ||
| 2757 : | <!-- <echo>Releng :: ${targetDir} :: ${dir.flat} :: @{dir}</echo> --> | ||
| 2758 : | <mkdir dir="${targetDir}/releng/${dir.flat}" /> | ||
| 2759 : | <copy todir="${targetDir}/releng/${dir.flat}"> | ||
| 2760 : | <fileset dir="@{dir}" includes="**" defaultexcludes="${defaultExcludes}" /> | ||
| 2761 : | </copy> | ||
| 2762 : | </then> | ||
| 2763 : | </elseif> | ||
| 2764 : | </if> | ||
| 2765 : | <var name="dir.flat" unset="true" /> | ||
| 2766 : | nickb | 1.84 | </then> |
| 2767 : | </if> | ||
| 2768 : | </sequential> | ||
| 2769 : | </for> | ||
| 2770 : | </target> | ||
| 2771 : | |||
| 2772 : | nickb | 1.63 | <target name="collectMaps"> |
| 2773 : | <!-- [256201] merge mapfiles to root & rename --> | ||
| 2774 : | <if> | ||
| 2775 : | <available file="${buildDir}/directory.txt" type="file" /> | ||
| 2776 : | <then> | ||
| 2777 : | <delete file="${buildDir}/directory.txt" /> | ||
| 2778 : | </then> | ||
| 2779 : | </if> | ||
| 2780 : | nickb | 1.135 | <if> |
| 2781 : | <available file="${relengBuilderDir}/maps" type="dir" /> | ||
| 2782 : | <then> | ||
| 2783 : | <for param="file"> | ||
| 2784 : | <path> | ||
| 2785 : | <fileset dir="${relengBuilderDir}/maps" includes="*.map" /> | ||
| 2786 : | </path> | ||
| 2787 : | <sequential> | ||
| 2788 : | <loadfile property="map.file" srcfile="@{file}" /> | ||
| 2789 : | <echo file="${buildDir}/directory.txt" append="true"> | ||
| 2790 : | nickb | 1.63 | !*** @{file} |
| 2791 : | ${map.file} | ||
| 2792 : | |||
| 2793 : | </echo> | ||
| 2794 : | nickb | 1.135 | <var name="map.file" unset="true" /> |
| 2795 : | </sequential> | ||
| 2796 : | </for> | ||
| 2797 : | </then> | ||
| 2798 : | <else> | ||
| 2799 : | <echo file="${buildDir}/directory.txt" append="true"> | ||
| 2800 : | !*** No maps found in ${relengBuilderDir}/maps | ||
| 2801 : | !*** Build from local sources in ${localSourceCheckoutDir} | ||
| 2802 : | nickb | 1.66 | |
| 2803 : | nickb | 1.135 | </echo> |
| 2804 : | </else> | ||
| 2805 : | </if> | ||
| 2806 : | nickb | 1.137 | |
| 2807 : | nickb | 1.65 | <!-- verify that if we're using SVN sources we have SVN support in basebuilder --> |
| 2808 : | <loadfile property="directory.txt.contents" srcFile="${buildDir}/directory.txt" /> | ||
| 2809 : | <if> | ||
| 2810 : | <and> | ||
| 2811 : | <contains string="${directory.txt.contents}" substring="=SVN,,http" /> | ||
| 2812 : | <not> | ||
| 2813 : | <available file="${relengBaseBuilderDir}/plugins/org.eclipse.pde.build.svn_1.0.1.v20070222.jar" type="file" /> | ||
| 2814 : | </not> | ||
| 2815 : | </and> | ||
| 2816 : | <then> | ||
| 2817 : | <fail>Error! | ||
| 2818 : | Map file(s) require SVN checkout support in PDE, but could not find | ||
| 2819 : | ${relengBaseBuilderDir}/ | ||
| 2820 : | plugins/org.eclipse.pde.build.svn_1.0.1.v20070222.jar. | ||
| 2821 : | |||
| 2822 : | You will need to manually add this jar if it cannot be done | ||
| 2823 : | automatically via the build due to permission problems or other | ||
| 2824 : | restrictions. | ||
| 2825 : | </fail> | ||
| 2826 : | </then> | ||
| 2827 : | </if> | ||
| 2828 : | nickb | 1.63 | </target> |
| 2829 : | |||
| 2830 : | nickb | 1.106 | <!-- convert an svn directory tree into map format --> |
| 2831 : | <target name="dir2svnmap"> | ||
| 2832 : | <property name="dir2map.reporoot" value="http://anonsvn.jboss.org/repos" /> | ||
| 2833 : | <property name="dir2map.repopath" value="jbosstools/trunk/foo" /> | ||
| 2834 : | <property name="dir2map.dir" value="/home/nboldt/eclipse/workspace-jboss/jbosstools-trunk/foo" /> | ||
| 2835 : | <property name="dir2map.map" value="/home/nboldt/eclipse/workspace-jboss/jbosstools-trunk/foo/releng/maps/project.map" /> | ||
| 2836 : | <property name="dir2map.exclude" value="**/releng/**, **/.svn/**, **/CVS/**" /> | ||
| 2837 : | <delete file="${dir2map.map}" quiet="true" /> | ||
| 2838 : | <echo file="${dir2map.map}">!*** Generated with org.eclipse.dash.common.releng/tools/scripts/buildAllHelper.xml#dir2svnmap task | ||
| 2839 : | </echo> | ||
| 2840 : | <for param="dir"> | ||
| 2841 : | <path> | ||
| 2842 : | <dirset dir="${dir2map.dir}" excludes="${dir2map.exclude}"> | ||
| 2843 : | </dirset> | ||
| 2844 : | </path> | ||
| 2845 : | <sequential> | ||
| 2846 : | <if> | ||
| 2847 : | <not> | ||
| 2848 : | <or> | ||
| 2849 : | <!-- exclude paths which might be in the workspace which are NOT relevant here --> | ||
| 2850 : | <contains string="@{dir}" substring=".metadata" /> | ||
| 2851 : | <contains string="@{dir}" substring="org.eclipse.releng.basebuilder" /> | ||
| 2852 : | <contains string="@{dir}" substring="org.eclipse.dash.common.releng" /> | ||
| 2853 : | </or> | ||
| 2854 : | </not> | ||
| 2855 : | <then> | ||
| 2856 : | <var name="dir.flat" unset="true" /> | ||
| 2857 : | <var name="dir.svn" unset="true" /> | ||
| 2858 : | <!-- flatten path to get just the dir --> | ||
| 2859 : | <basename property="dir.flat" file="@{dir}" /> | ||
| 2860 : | <!-- trim the "-feature" dir suffix off since we assume the featureid does not include it --> | ||
| 2861 : | <propertyregex property="dir.flat" | ||
| 2862 : | defaultvalue="${dir.flat}" | ||
| 2863 : | input="${dir.flat}" | ||
| 2864 : | regexp="([^/\\]+)-feature" | ||
| 2865 : | replace="\1" | ||
| 2866 : | override="true" | ||
| 2867 : | /> | ||
| 2868 : | |||
| 2869 : | <!-- trim off the base dir to get just the path --> | ||
| 2870 : | <pathconvert property="dir.svn"> | ||
| 2871 : | <path path="@{dir}" /> | ||
| 2872 : | <chainedmapper> | ||
| 2873 : | <regexpmapper from="${dir2map.dir}/(.*)" to="\1" handledirsep="yes" /> | ||
| 2874 : | </chainedmapper> | ||
| 2875 : | </pathconvert> | ||
| 2876 : | <if> | ||
| 2877 : | <available file="@{dir}/feature.xml" type="file" /> | ||
| 2878 : | <then> | ||
| 2879 : | <!-- feature@org.jboss.tools.jmx.sdk.feature=SVN,,http://anonsvn.jboss.org/repos,,jbosstools/trunk/jmx/features/org.jboss.tools.jmx.sdk.feature --> | ||
| 2880 : | <echo append="true" file="${dir2map.map}">feature@${dir.flat}=SVN,,${dir2map.reporoot},,${dir2map.repopath}/${dir.svn} | ||
| 2881 : | </echo> | ||
| 2882 : | </then> | ||
| 2883 : | <elseif> | ||
| 2884 : | <or> | ||
| 2885 : | <available file="@{dir}/META-INF/MANIFEST.MF" type="file" /> | ||
| 2886 : | <available file="@{dir}/plugin.xml" type="file" /> | ||
| 2887 : | <available file="@{dir}/fragment.xml" type="file" /> | ||
| 2888 : | </or> | ||
| 2889 : | <then> | ||
| 2890 : | <!-- plugin@org.jboss.tools.jmx.core=SVN,,http://anonsvn.jboss.org/repos,,jbosstools/trunk/jmx/plugins/org.jboss.tools.jmx.core --> | ||
| 2891 : | <echo append="true" file="${dir2map.map}">plugin@${dir.flat}=SVN,,${dir2map.reporoot},,${dir2map.repopath}/${dir.svn} | ||
| 2892 : | </echo> | ||
| 2893 : | </then> | ||
| 2894 : | </elseif> | ||
| 2895 : | </if> | ||
| 2896 : | <var name="dir.flat" unset="true" /> | ||
| 2897 : | <var name="dir.svn" unset="true" /> | ||
| 2898 : | </then> | ||
| 2899 : | </if> | ||
| 2900 : | </sequential> | ||
| 2901 : | </for> | ||
| 2902 : | </target> | ||
| 2903 : | |||
| 2904 : | nickb | 1.91 | <!-- [278687] Supported target .psf file formats are: |
| 2905 : | CVS, SVN-Subclipse, SVN-Subversive. | ||
| 2906 : | Because Subclipse and Subversive formats are not the same, we need to produce | ||
| 2907 : | TWO .psfs from each .map file. | ||
| 2908 : | |||
| 2909 : | Maps with a mix of CVS and SVN will result in three .psfs (2 for the SVN entries, 1 for CVS); | ||
| 2910 : | CVS .psf will have SVN entries commented out, SVN .psfs will have CVS entries commented out. | ||
| 2911 : | |||
| 2912 : | Possible future considerations include | ||
| 2913 : | HTTP map files (eg., Orbit jars) | ||
| 2914 : | Git map files (?) | ||
| 2915 : | --> | ||
| 2916 : | <target name="map2psf" description="generate psfs/*.psf from every map file in maps/*.map"> | ||
| 2917 : | <if> | ||
| 2918 : | <available file="${relengBuilderDir}/maps" type="dir" /> | ||
| 2919 : | <then> | ||
| 2920 : | <mkdir dir="${relengBuilderDir}/psfs" /> | ||
| 2921 : | |||
| 2922 : | <!-- Process mapfiles for CVS content --> | ||
| 2923 : | <for param="mapfile"> | ||
| 2924 : | <path> | ||
| 2925 : | <fileset dir="${relengBuilderDir}/maps" includes="*.map"> | ||
| 2926 : | <contains text="CVS" casesensitive="false" /> | ||
| 2927 : | </fileset> | ||
| 2928 : | </path> | ||
| 2929 : | <sequential> | ||
| 2930 : | <propertyregex property="psfdir" | ||
| 2931 : | input="@{mapfile}" | ||
| 2932 : | defaultvalue="@{mapfile}" | ||
| 2933 : | regexp="/maps/.+" | ||
| 2934 : | replace="/psfs/" | ||
| 2935 : | override="true" | ||
| 2936 : | /> | ||
| 2937 : | <propertyregex property="psffileprefix" | ||
| 2938 : | input="@{mapfile}" | ||
| 2939 : | defaultvalue="@{mapfile}" | ||
| 2940 : | regexp=".+/maps/(.+).map" | ||
| 2941 : | replace="\1" | ||
| 2942 : | override="true" | ||
| 2943 : | /> | ||
| 2944 : | |||
| 2945 : | <!-- create psf in cvs format --> | ||
| 2946 : | <delete dir="${psfdir}" includes="${psffileprefix}.cvs.psf" /> | ||
| 2947 : | <var name="psffile" value="${psfdir}/${psffileprefix}.cvs.psf" /> | ||
| 2948 : | <concat destfile="${psffile}"> | ||
| 2949 : | <header filtering="no"><?xml version="1.0" encoding="UTF-8"?> | ||
| 2950 : | <psf version="2.0"> | ||
| 2951 : | <provider id="org.eclipse.team.cvs.core.cvsnature"> | ||
| 2952 : | nickb | 1.94 | |
| 2953 : | nickb | 1.91 | </header> |
| 2954 : | <path path="@{mapfile}" /> | ||
| 2955 : | nickb | 1.94 | <footer> |
| 2956 : | </provider> | ||
| 2957 : | nickb | 1.91 | </psf> |
| 2958 : | </footer> | ||
| 2959 : | </concat> | ||
| 2960 : | <!-- | ||
| 2961 : | FROM: | ||
| 2962 : | \1 \2 \3 \4 \5 \6 | ||
| 2963 : | plugin@org.eclipse.gef=v20090306-1147,:pserver:anonymous@dev.eclipse.org:/cvsroot/tools,,org.eclipse.gef/plugins/org.eclipse.gef | ||
| 2964 : | feature@org.eclipse.draw2d=v20090316-1158,:pserver:anonymous@dev.eclipse.org:/cvsroot/tools,,org.eclipse.gef/features/org.eclipse.draw2d-feature | ||
| 2965 : | \1 \2 \3 \4 | ||
| 2966 : | plugin@org.eclipse.test=v20080313,:pserver:anonymous@dev.eclipse.org:/cvsroot/eclipse, | ||
| 2967 : | fragment@org.eclipse.ant.optional.junit=v20070202,:pserver:anonymous@dev.eclipse.org:/cvsroot/eclipse, | ||
| 2968 : | TO: | ||
| 2969 : | <project reference="1.0,ROOT,PATH,MODULENAME,BRANCHorTAG"/> | ||
| 2970 : | <project reference="1.0,:pserver:anonymous@dev.eclipse.org:/cvsroot/tools,path/to/org.eclipse.gef,org.eclipse.gef,v20090316"/> | ||
| 2971 : | <project reference="1.0,:pserver:anonymous@dev.eclipse.org:/cvsroot/eclipse,org.eclipse.test"/> | ||
| 2972 : | --> | ||
| 2973 : | <replaceregexp file="${psffile}" | ||
| 2974 : | match="(.+)@(.+)=([^,]+),([^,]+),([^,]*),([^,]+)" | ||
| 2975 : | replace=" <project reference="1.0,\4,\6,\2,\3"/>" | ||
| 2976 : | flags="g" | ||
| 2977 : | byline="true" | ||
| 2978 : | /> | ||
| 2979 : | <replaceregexp file="${psffile}" | ||
| 2980 : | match="(.+)@(.+)=([^,]+),([^,]+).*" | ||
| 2981 : | replace=" <project reference="1.0,\4,\2,\2,\3"/>" | ||
| 2982 : | flags="g" | ||
| 2983 : | byline="true" | ||
| 2984 : | /> | ||
| 2985 : | <replaceregexp file="${psffile}" match="(\!\*|\#)(.+)" replace=" <!-- \1\2 -->" flags="g" byline="true" /> | ||
| 2986 : | <replaceregexp file="${psffile}" match="(.+)(=SVN,)(.+)" replace=" <!-- \1\2\3 -->" flags="g" byline="true" /> | ||
| 2987 : | nickb | 1.96 | <replaceregexp file="${psffile}" match="///" replace="/" flags="g" /> |
| 2988 : | nickb | 1.95 | |
| 2989 : | nickb | 1.91 | <var name="psffile" unset="true" /> |
| 2990 : | <var name="psffileprefix" unset="true" /> | ||
| 2991 : | <var name="psfdir" unset="true" /> | ||
| 2992 : | </sequential> | ||
| 2993 : | </for> | ||
| 2994 : | |||
| 2995 : | <!-- Process mapfiles for SVN content --> | ||
| 2996 : | <for param="mapfile"> | ||
| 2997 : | <path> | ||
| 2998 : | <fileset dir="${relengBuilderDir}/maps" includes="*.map"> | ||
| 2999 : | <contains text="SVN" casesensitive="false" /> | ||
| 3000 : | </fileset> | ||
| 3001 : | </path> | ||
| 3002 : | <sequential> | ||
| 3003 : | <propertyregex property="psfdir" | ||
| 3004 : | input="@{mapfile}" | ||
| 3005 : | defaultvalue="@{mapfile}" | ||
| 3006 : | regexp="/maps/.+" | ||
| 3007 : | replace="/psfs/" | ||
| 3008 : | override="true" | ||
| 3009 : | /> | ||
| 3010 : | <propertyregex property="psffileprefix" | ||
| 3011 : | input="@{mapfile}" | ||
| 3012 : | defaultvalue="@{mapfile}" | ||
| 3013 : | regexp=".+/maps/(.+).map" | ||
| 3014 : | replace="\1" | ||
| 3015 : | override="true" | ||
| 3016 : | /> | ||
| 3017 : | |||
| 3018 : | <!-- create psf in subversive format --> | ||
| 3019 : | <delete dir="${psfdir}" includes="${psffileprefix}.subversive.psf" /> | ||
| 3020 : | <var name="psffile" value="${psfdir}/${psffileprefix}.subversive.psf" /> | ||
| 3021 : | <concat destfile="${psffile}"> | ||
| 3022 : | <header filtering="no"><?xml version="1.0" encoding="UTF-8"?> | ||
| 3023 : | <psf version="2.0"> | ||
| 3024 : | <provider id="org.eclipse.team.svn.core.svnnature"> | ||
| 3025 : | nickb | 1.94 | |
| 3026 : | nickb | 1.91 | </header> |
| 3027 : | <path path="@{mapfile}" /> | ||
| 3028 : | nickb | 1.94 | <footer> |
| 3029 : | </provider> | ||
| 3030 : | nickb | 1.91 | </psf> |
| 3031 : | </footer> | ||
| 3032 : | </concat> | ||
| 3033 : | <!-- | ||
| 3034 : | FROM: | ||
| 3035 : | \1 \2 \3 \4 \5 \6 | ||
| 3036 : | feature@org.eclipse.vtp.feature.all=SVN,trunk,http://dev.eclipse.org/svnroot/technology/org.eclipse.vtp,Releng,org.eclipse.vtp.feature.all | ||
| 3037 : | feature@org.jboss.tools.jmx.sdk.feature=SVN,,http://anonsvn.jboss.org/repos,,jbosstools/trunk/jmx/features/org.jboss.tools.jmx.sdk.feature | ||
| 3038 : | plugin@org.jboss.tools.jmx.core=SVN,,http://anonsvn.jboss.org/repos,,jbosstools/trunk/jmx/plugins/org.jboss.tools.jmx.core | ||
| 3039 : | nickb | 1.94 | plugin@org.jboss.ide.eclipse.freemarker=SVN,,http://anonsvn.jboss.org/repos,,jbosstools/trunk/freemarker/plugins/org.jboss.ide.eclipse.freemarker |
| 3040 : | nickb | 1.91 | |
| 3041 : | \1 \2 \3 \4 \5 \6 | ||
| 3042 : | plugin@org.eclipse.linuxtools.changelog.doc=SVN,,http://dev.eclipse.org/svnroot/technology,,org.eclipse.linuxtools/changelog/trunk/org.eclipse.linuxtools.changelog.doc | ||
| 3043 : | fragment@org.eclipse.linuxtools.changelog.parsers.java=SVN,,http://dev.eclipse.org/svnroot/technology,,org.eclipse.linuxtools/changelog/trunk/org.eclipse.linuxtools.changelog.javaparser | ||
| 3044 : | feature@org.eclipse.linuxtools.changelog=SVN,,http://dev.eclipse.org/svnroot/technology,,org.eclipse.linuxtools/changelog/trunk/org.eclipse.linuxtools.changelog-feature | ||
| 3045 : | TO (line breaks added for clarity; should be a single line of XML): | ||
| 3046 : | <project reference="1.0.1,https://dev.eclipse.org/svnroot/technology/org.eclipse.vtp/Releng/trunk/org.eclipse.vtp.releng,org.eclipse.vtp.releng, | ||
| 3047 : | 0005dcf07f32001e162a94aa39f2ce50; | ||
| 3048 : | https://dev.eclipse.org/svnroot/technology/org.eclipse.vtp/Releng/trunk/org.eclipse.vtp.releng; | ||
| 3049 : | https://dev.eclipse.org/svnroot/technology/org.eclipse.vtp/Releng/trunk/org.eclipse.vtp.releng; | ||
| 3050 : | branches;tags;trunk;true;ee007c2a-0a25-0410-9ab9-bf268980928c; | ||
| 3051 : | https://dev.eclipse.org/svnroot/technology/org.eclipse.vtp;;false;;;22"/> | ||
| 3052 : | nickb | 1.94 | - or - |
| 3053 : | <project reference="1.0.1,https://dev.eclipse.org/svnroot/technology/org.eclipse.vtp/Releng/trunk/org.eclipse.vtp.releng,org.eclipse.vtp.releng"/> | ||
| 3054 : | nickb | 1.91 | --> |
| 3055 : | <!-- insanely verbose format --> | ||
| 3056 : | <!-- <replaceregexp file="${psffile}" | ||
| 3057 : | match="(.+)@(.+)=SVN,([^,]*),([^,]+),([^,]*),([^,]+)" | ||
| 3058 : | replace=" <project reference="1.0.1,\4/\5/\3/\6,\2,000;\4/\5/\3/\6;\4/\5/\3/\6;branches;tags;trunk;true;000;\4;;false;;;000"/>" | ||
| 3059 : | flags="g" | ||
| 3060 : | byline="true" | ||
| 3061 : | /> --> | ||
| 3062 : | <!-- simple format --> | ||
| 3063 : | <replaceregexp file="${psffile}" | ||
| 3064 : | nickb | 1.94 | match="(.+)@(.+)=SVN,([^,]+),([^,]+),([^,]+),([^,]+)" |
| 3065 : | nickb | 1.91 | replace=" <project reference="1.0.1,\4/\5/\3/\6,\2"/>" |
| 3066 : | flags="g" | ||
| 3067 : | byline="true" | ||
| 3068 : | /> | ||
| 3069 : | nickb | 1.94 | <replaceregexp file="${psffile}" |
| 3070 : | match="(.+)@(.+)=SVN,,([^,]+),,([^,]+)" | ||
| 3071 : | replace=" <project reference="1.0.1,\3/\4,\2"/>" | ||
| 3072 : | flags="g" | ||
| 3073 : | byline="true" | ||
| 3074 : | /> | ||
| 3075 : | nickb | 1.91 | <replaceregexp file="${psffile}" match="(\!\*|\#)(.+)" replace=" <!-- \1\2 -->" flags="g" byline="true" /> |
| 3076 : | <replaceregexp file="${psffile}" match="(.+)(/cvs)(.+)" replace=" <!-- \1\2\3 -->" flags="g" byline="true" /> | ||
| 3077 : | nickb | 1.96 | <replaceregexp file="${psffile}" match="///" replace="/" flags="g" /> |
| 3078 : | nickb | 1.91 | |
| 3079 : | <!-- create psf in subclipse format --> | ||
| 3080 : | <delete dir="${psfdir}" includes="${psffileprefix}.subclipse.psf" /> | ||
| 3081 : | <var name="psffile" value="${psfdir}/${psffileprefix}.subclipse.psf" /> | ||
| 3082 : | <concat destfile="${psffile}"> | ||
| 3083 : | <header filtering="no"><?xml version="1.0" encoding="UTF-8"?> | ||
| 3084 : | <psf version="2.0"> | ||
| 3085 : | <provider id="org.tigris.subversion.subclipse.core.svnnature"> | ||
| 3086 : | nickb | 1.94 | |
| 3087 : | nickb | 1.91 | </header> |
| 3088 : | <path path="@{mapfile}" /> | ||
| 3089 : | nickb | 1.94 | <footer> |
| 3090 : | </provider> | ||
| 3091 : | nickb | 1.91 | </psf> |
| 3092 : | </footer> | ||
| 3093 : | </concat> | ||
| 3094 : | <!-- | ||
| 3095 : | FROM: | ||
| 3096 : | feature@org.eclipse.vtp.feature.all=SVN,trunk,http://dev.eclipse.org/svnroot/technology/org.eclipse.vtp,Releng,org.eclipse.vtp.feature.all | ||
| 3097 : | feature@org.jboss.tools.jmx.sdk.feature=SVN,,http://anonsvn.jboss.org/repos,,jbosstools/trunk/jmx/features/org.jboss.tools.jmx.sdk.feature | ||
| 3098 : | plugin@org.jboss.tools.jmx.core=SVN,,http://anonsvn.jboss.org/repos,,jbosstools/trunk/jmx/plugins/org.jboss.tools.jmx.core | ||
| 3099 : | plugin@org.eclipse.linuxtools.changelog.doc=SVN,,http://dev.eclipse.org/svnroot/technology,,org.eclipse.linuxtools/changelog/trunk/org.eclipse.linuxtools.changelog.doc | ||
| 3100 : | fragment@org.eclipse.linuxtools.changelog.parsers.java=SVN,,http://dev.eclipse.org/svnroot/technology,,org.eclipse.linuxtools/changelog/trunk/org.eclipse.linuxtools.changelog.javaparser | ||
| 3101 : | feature@org.eclipse.linuxtools.changelog=SVN,,http://dev.eclipse.org/svnroot/technology,,org.eclipse.linuxtools/changelog/trunk/org.eclipse.linuxtools.changelog-feature | ||
| 3102 : | TO: | ||
| 3103 : | <project reference="0.9.3,svn://svn.jboss.org/repos/jbosstools/trunk/jmx/features/org.jboss.tools.jmx.sdk.feature,org.jboss.tools.jmx.sdk.feature"/> | ||
| 3104 : | <project reference="0.9.3,svn://svn.jboss.org/repos/jbosstools/trunk/jmx/plugins/org.jboss.tools.jmx.core,org.jboss.tools.jmx.core"/> | ||
| 3105 : | --> | ||
| 3106 : | <replaceregexp file="${psffile}" | ||
| 3107 : | match="(.+)@(.+)=SVN,([^,]*),([^,]+),([^,]*),([^,]+)" | ||
| 3108 : | replace=" <project reference="0.9.3,\4/\5/\3/\6,\2"/>" | ||
| 3109 : | flags="g" | ||
| 3110 : | byline="true" | ||
| 3111 : | /> | ||
| 3112 : | nickb | 1.94 | <replaceregexp file="${psffile}" |
| 3113 : | match="(.+)@(.+)=SVN,,([^,]+),,([^,]+)" | ||
| 3114 : | replace=" <project reference="0.9.3,\3/\4,\2"/>" | ||
| 3115 : | flags="g" | ||
| 3116 : | byline="true" | ||
| 3117 : | /> | ||
| 3118 : | nickb | 1.91 | <replaceregexp file="${psffile}" match="(\!\*|\#)(.+)" replace=" <!-- \1\2 -->" flags="g" byline="true" /> |
| 3119 : | <replaceregexp file="${psffile}" match="(.+)(/cvs)(.+)" replace=" <!-- \1\2\3 -->" flags="g" byline="true" /> | ||
| 3120 : | nickb | 1.96 | <replaceregexp file="${psffile}" match="///" replace="/" flags="g" /> |
| 3121 : | nickb | 1.91 | |
| 3122 : | <var name="psffile" unset="true" /> | ||
| 3123 : | <var name="psffileprefix" unset="true" /> | ||
| 3124 : | <var name="psfdir" unset="true" /> | ||
| 3125 : | </sequential> | ||
| 3126 : | </for> | ||
| 3127 : | </then> | ||
| 3128 : | <else> | ||
| 3129 : | <echo>Warning! | ||
| 3130 : | Map directory ${relengBuilderDir}/maps does not exist. Nothing to do! | ||
| 3131 : | nickb | 1.93 | </echo> |
| 3132 : | nickb | 1.91 | </else> |
| 3133 : | </if> | ||
| 3134 : | </target> | ||
| 3135 : | nickb | 1.134 | |
| 3136 : | <target name="provision.eclipse.build.base"> | ||
| 3137 : | <antcall target="provision.eclipse.base"> | ||
| 3138 : | <param name="provision.eclipse.base.target" value="${buildDir}" /> | ||
| 3139 : | </antcall> | ||
| 3140 : | </target> | ||
| 3141 : | <target name="provision.eclipse.test.base"> | ||
| 3142 : | <antcall target="provision.eclipse.base"> | ||
| 3143 : | <param name="provision.eclipse.base.target" value="${install}" /> | ||
| 3144 : | </antcall> | ||
| 3145 : | </target> | ||
| 3146 : | <target name="provision.eclipse.base"> | ||
| 3147 : | <property name="provision.eclipse.base.target" value="${buildDir}" /> | ||
| 3148 : | <if> | ||
| 3149 : | <and> | ||
| 3150 : | <isset property="eclipse.base.url" /> | ||
| 3151 : | <isset property="eclipse.base.file" /> | ||
| 3152 : | </and> | ||
| 3153 : | <then> | ||
| 3154 : | <echo message="Provision Eclipse base from ${eclipse.base.file} into ${provision.eclipse.base.target}..." /> | ||
| 3155 : | <ant target="getDep" antfile="${relengCommonBuilderDir}/tools/scripts/getDependencies.xml"> | ||
| 3156 : | <property name="url" value="${eclipse.base.url}" /> | ||
| 3157 : | <property name="file" value="${eclipse.base.file}" /> | ||
| 3158 : | <property name="unpackDest" value="${provision.eclipse.base.target}" /> | ||
| 3159 : | </ant> | ||
| 3160 : | </then> | ||
| 3161 : | <elseif> | ||
| 3162 : | <not> | ||
| 3163 : | <and> | ||
| 3164 : | <isset property="repositoryURLs" /> | ||
| 3165 : | <or> | ||
| 3166 : | <isset property="IUsToInstall" /> | ||
| 3167 : | <isset property="pluginIDsToInstall" /> | ||
| 3168 : | <isset property="featureIDsToInstall" /> | ||
| 3169 : | </or> | ||
| 3170 : | </and> | ||
| 3171 : | </not> | ||
| 3172 : | <then> | ||
| 3173 : | <fail>Error! | ||
| 3174 : | Build cannot continue without a defined Eclipse base. | ||
| 3175 : | ---------- | ||
| 3176 : | You must specify either | ||
| 3177 : | dependencyURLs=http://download.eclipse.org/eclipse/downloads/drops/R-3.5-200906111540/eclipse-SDK-3.5-linux-gtk.tar.gz | ||
| 3178 : | (or equivalent platform, RCP, etc.) | ||
| 3179 : | or | ||
| 3180 : | repositoryURLs=http://download.eclipse.org/eclipse/updates/3.5.x/ | ||
| 3181 : | featureIDsToInstall=org.eclipse.sdk | ||
| 3182 : | (or equivalent update site repos + features/plugins to install; | ||
| 3183 : | use featureIDsToInstall, pluginIDsToInstall and/or IUsToInstall) | ||
| 3184 : | </fail> | ||
| 3185 : | </then> | ||
| 3186 : | </elseif> | ||
| 3187 : | </if> | ||
| 3188 : | </target> | ||
| 3189 : | |||
| 3190 : | nickb | 1.129 | </project> |
| help@eclipse.org | ViewVC Help |
| Powered by ViewVC 1.0.3 |
