| <project name="Build specific targets and properties" default="noDefault"> |
| |
| <!-- ===================================================================== --> |
| <!-- Run a given ${target} on all elements being built --> |
| <!-- Add on <ant> task for each top level element being built. --> |
| <!-- ===================================================================== --> |
| <available property="allElementsFile" file="${builder}/allElements.xml" value="${builder}/allElements.xml" /> |
| <property name="allElementsFile" location="${eclipse.pdebuild.templates}/headless-build/allElements.xml" /> |
| <property name="repoBaseline" value="${updateSite}"/> |
| |
| <import file="${allElementsFile}" /> |
| <target name="allElements"> |
| <antcall target="allElementsDelegator" /> |
| </target> |
| |
| <!-- ===================================================================== --> |
| <!-- Check out map files from correct repository --> |
| <!-- Replace values for mapsCheckoutTag as desired. --> |
| <!-- ===================================================================== --> |
| <target name="getMapFiles" depends="checkLocalMaps,initLocations" unless="skipMaps"> |
| <mkdir dir="${buildDirectory}/maps" /> |
| <copy todir="${buildDirectory}/maps"> |
| <fileset dir="${builder}/../maps" /> |
| <fileset dir="${builder}/../../org.eclipse.e4.ui.releng/maps" /> |
| </copy> |
| <replace dir="${buildDirectory}/maps/" value="${eclipseRepoURL-latest}" token="ECLIPSE_PLATFORM_REPO" /> |
| </target> |
| |
| <target name="checkLocalMaps"> |
| <available property="skipMaps" file="${buildDirectory}/maps" /> |
| </target> |
| |
| <target name="tagMapFiles" if="tagMaps"> |
| <!--cvs dest="${buildDirectory}/maps/${mapsRoot_sdk}" command="tag ${mapsTagTag}" /> |
| <cvs dest="${buildDirectory}/maps/${mapsRoot_e4}" command="tag ${mapsTagTag}" /--> |
| </target> |
| |
| <!-- ===================================================================== --> |
| |
| <target name="clean" unless="noclean"> |
| <antcall target="allElements"> |
| <param name="target" value="cleanElement" /> |
| </antcall> |
| </target> |
| |
| <target name="gatherLogs"> |
| <mkdir dir="${buildDirectory}/${buildLabel}/compilelogs" /> |
| <antcall target="allElements"> |
| <param name="target" value="gatherLogs" /> |
| </antcall> |
| <unzip dest="${buildDirectory}/${buildLabel}/compilelogs" overwrite="true"> |
| <fileset dir="${buildDirectory}/features"> |
| <include name="**/*.log.zip" /> |
| </fileset> |
| </unzip> |
| </target> |
| |
| <!-- ===================================================================== --> |
| <!-- Steps to do before setup --> |
| <!-- ===================================================================== --> |
| <target name="preSetup"> |
| <filter token="BUILD_ID" value="${buildLabel}" /> |
| <copy filtering="true" file="${builder}/templates/artifacts.xml" tofile="${p2.repo}/artifacts.xml" /> |
| </target> |
| |
| <target name="initLocations" > |
| <available property="repoURLFile" value="${buildDirectory}/eclipseRepoURL.properties" file="${buildDirectory}/eclipseRepoURL.properties" /> |
| <antcall target="initRepoURLFile" /> |
| <property name="repoURLFile" value="${buildDirectory}/eclipseRepoURL.properties" /> |
| <property file="${repoURLFile}"/> |
| </target> |
| |
| <target name="initRepoURLFile" unless="repoURLFile" > |
| <!-- figure out what the most recent eclipse IBuild is --> |
| <get src="${eclipseRepoURL}/compositeContent.jar" dest="${buildDirectory}/eclipseRepo.jar" /> |
| <loadproperties> |
| <zipentry zipfile="${buildDirectory}/eclipseRepo.jar" name="compositeContent.xml" /> |
| <filterchain> |
| <replaceregex pattern=".*location\s*=\s*'(.+)'.*" replace="eclipseBuildId=\1" flags="s" /> |
| </filterchain> |
| </loadproperties> |
| |
| <!-- store it for others --> |
| <echo message="eclipseRepoURL-latest=${eclipseRepoURL}/${eclipseBuildId}${line.separator}" file="${buildDirectory}/eclipseRepoURL.properties" /> |
| </target> |
| |
| <!-- ===================================================================== --> |
| <!-- Steps to do after setup but before starting the build proper --> |
| <!-- ===================================================================== --> |
| <target name="postSetup" depends="initLocations"> |
| <echo message="Mirror from ${eclipseRepoURL-latest} to ${localRepoLocation}" /> |
| <p2.mirror ignoreerrors="true"> |
| <destination location="file:${localRepoLocation}" format="file:${p2.repo}" /> |
| <source location="${eclipseRepoURL-latest}" /> |
| <slicingOptions includeOptional="false" includeNonGreedy="false" latestVersionOnly="true"/> |
| <iu id="org.eclipse.sdk.ide" /> |
| <iu id="org.eclipse.equinox.core.sdk.feature.group" /> |
| <iu id="org.eclipse.equinox.p2.user.ui.source.feature.group" /> |
| </p2.mirror> |
| <p2.mirror destination="file:${localRepoLocation}" ignoreerrors="true"> |
| <source location="${eclipseRepoURL-latest}" /> |
| <slicingOptions includeOptional="false" includeNonGreedy="false" /> |
| <iu id="org.junit" version="0.0.0" /> |
| <iu id="org.junit.source" version="0.0.0" /> |
| </p2.mirror> |
| |
| <p2.mirror destination="file:${localRepoLocation}" ignoreerrors="true"> |
| <source location="${emfRepoURL}" /> |
| <slicingOptions includeOptional="false" includeNonGreedy="false" /> |
| <iu id="org.eclipse.emf.ecore.feature.group" version="0.0.0" /> |
| <iu id="org.eclipse.emf.common.feature.group" version="0.0.0" /> |
| </p2.mirror> |
| |
| <p2.repo2runnable destination="${transformedRepoLocation}"> |
| <source location="file:${localRepoLocation}"/> |
| </p2.repo2runnable> |
| |
| </target> |
| |
| <!-- ===================================================================== --> |
| <!-- Steps to do before fetching the build elements --> |
| <!-- ===================================================================== --> |
| <target name="preFetch"> |
| </target> |
| |
| <!-- ===================================================================== --> |
| <!-- Steps to do after fetching the build elements --> |
| <!-- ===================================================================== --> |
| <target name="postFetch"> |
| <ant antfile="${genericTargets}" target="fetchElement"> |
| <property name="type" value="feature"/> |
| <property name="id" value="org.eclipse.license" /> |
| </ant> |
| |
| <!-- change source references to pserver if ssh was used --> |
| <replace file="${buildDirectory}/sourceReferences.properties" token=":extssh" value=":pserver" /> |
| |
| <replace dir="${buildDirectory}/plugins" value="${buildLabel}" token="@build@"> |
| <include name="**/about.mappings" /> |
| </replace> |
| |
| <!-- bug 338230 - update branding plugins to get proper versions in Help/About--> |
| <concat destfile="${buildDirectory}/plugins/org.eclipse.sdk/build.properties" append="true">${line.separator}qualifier=v${buildId}${line.separator}</concat> |
| <concat destfile="${buildDirectory}/plugins/org.eclipse.platform/build.properties" append="true">${line.separator}qualifier=v${buildId}${line.separator}</concat> |
| <concat destfile="${buildDirectory}/plugins/org.eclipse.rcp/build.properties" append="true">${line.separator}qualifier=v${buildId}${line.separator}</concat> |
| </target> |
| |
| <!-- ===================================================================== --> |
| <!-- Steps to do before the repositories are being processed --> |
| <!-- ===================================================================== --> |
| <target name="preProcessRepos"> |
| </target> |
| |
| <!-- ===================================================================== --> |
| <!-- Steps to do after the repositories have been processed --> |
| <!-- ===================================================================== --> |
| <target name="postProcessRepos"> |
| </target> |
| |
| <!-- ===================================================================== --> |
| <!-- Steps to do before generating the build scripts. --> |
| <!-- ===================================================================== --> |
| <target name="preGenerate"> |
| </target> |
| |
| <!-- ===================================================================== --> |
| <!-- Steps to do after generating the build scripts. --> |
| <!-- ===================================================================== --> |
| <target name="postGenerate"> |
| <antcall target="clean" /> |
| </target> |
| |
| <!-- ===================================================================== --> |
| <!-- Steps to do before running the build.xmls for the elements being built. --> |
| <!-- ===================================================================== --> |
| <target name="preProcess"> |
| </target> |
| |
| <!-- ===================================================================== --> |
| <!-- Steps to do after running the build.xmls for the elements being built. --> |
| <!-- ===================================================================== --> |
| <target name="postProcess"> |
| </target> |
| |
| <!-- ===================================================================== --> |
| <!-- Steps to do before running assemble. --> |
| <!-- ===================================================================== --> |
| <target name="preAssemble"> |
| </target> |
| |
| <!-- ===================================================================== --> |
| <!-- Steps to do after running assemble. --> |
| <!-- ===================================================================== --> |
| <target name="postAssemble"> |
| </target> |
| |
| <!-- ===================================================================== --> |
| <!-- Steps to do before running package. --> |
| <!-- ===================================================================== --> |
| <target name="prePackage"> |
| </target> |
| |
| <!-- ===================================================================== --> |
| <!-- Steps to do after running package. --> |
| <!-- ===================================================================== --> |
| <target name="postPackage"> |
| </target> |
| |
| <macrodef name="publishProduct"> |
| <attribute name="product" /> |
| <sequential> |
| <replace token="@qualifier@" file="@{product}" value="${buildLabel}" /> |
| <echo message="Publishing @{product} to file:${p2.repo}" /> |
| <p2.publish.product flavor="tooling" repository="file:${p2.repo}" productFile="@{product}" compress="true"> |
| <contextRepository location="file:${localRepoLocation}" /> |
| <config os="win32" ws="win32" arch="x86" /> |
| <config os="win32" ws="win32" arch="x86_64" /> |
| <config os="linux" ws="gtk" arch="x86" /> |
| <config os="linux" ws="gtk" arch="x86_64" /> |
| <!-- <config os="linux" ws="gtk" arch="ppc" /> --> |
| <config os="linux" ws="gtk" arch="ppc64" /> |
| <!--<config os="linux" ws="motif" arch="x86" /> --> |
| <config os="linux" ws="gtk" arch="s390x" /> |
| <config os="linux" ws="gtk" arch="s390" /> |
| <config os="solaris" ws="gtk" arch="sparc" /> |
| <config os="solaris" ws="gtk" arch="x86" /> |
| <config os="macosx" ws="cocoa" arch="x86" /> |
| <config os="macosx" ws="cocoa" arch="x86_64" /> |
| <!--<config os="macosx" ws="carbon" arch="ppc" /> |
| <config os="macosx" ws="carbon" arch="x86" />--> |
| <config os="hpux" ws="gtk" arch="ia64_32" /> |
| <config os="aix" ws="gtk" arch="ppc" /> |
| <config os="aix" ws="gtk" arch="ppc64" /> |
| <advice kind="featureVersions" file="${buildDirectory}/finalFeaturesVersions.properties" /> |
| <advice kind="pluginVersions" file="${buildDirectory}/finalPluginsVersions.properties" /> |
| </p2.publish.product> |
| </sequential> |
| </macrodef> |
| |
| <!-- ===================================================================== --> |
| <!-- Steps to do after the build is done. --> |
| <!-- ===================================================================== --> |
| <target name="postBuild"> |
| <antcall target="gatherLogs" /> |
| |
| <!--sign the build --> |
| <ant antfile="${org.eclipse.e4.builder}/builder/general/sign.xml" dir="${basedir}" target="createSigningArchive" > |
| <property name="includesFile" value="${buildDirectory}/built.list" /> |
| </ant> |
| <ant antfile="${org.eclipse.e4.builder}/builder/general/sign.xml" dir="${basedir}" target="signMasterFeature" /> |
| |
| <!--unzip signed build over top of the repository --> |
| <unzip dest="${p2.repo}" src="${signingArchive}" /> |
| |
| <!-- use eclipse.jarProcessor directly instead of the "pack" on p2.process.artifacts so that we |
| can specify the file to pack instead of doing everything --> |
| <eclipse.jarProcessor inputFolder="${p2.repo}" pack="true" > |
| <file dir="${p2.repo}" includesfile="${buildDirectory}/built.list" /> |
| </eclipse.jarProcessor> |
| <!--update repository with new checksums for signed bundles --> |
| <p2.process.artifacts repositoryPath="file://${p2.repo}" /> |
| <delete file="${p2.repo}/pack.properties" /> |
| |
| <publishProduct product="${eclipse.build.configs}/sdk/builder/sdk.product" /> |
| <publishProduct product="${eclipse.build.configs}/platform/platform.product" /> |
| <publishProduct product="${eclipse.build.configs}/platform.sdk/platform.product" /> |
| <publishProduct product="${eclipse.build.configs}/rcp/rcp.product" /> |
| <publishProduct product="${eclipse.build.configs}/rcp.sdk/rcp.product" /> |
| |
| <echo message="Mirroring org.eclipse.rcp.configuration.feature.group to file:${p2.repo}" /> |
| <p2.mirror destination="file:${p2.repo}"> |
| <source location="file:${p2.repo}" /> |
| <source location="file:${localRepoLocation}" /> |
| <slicingOptions includeNonGreedy="false" /> |
| <iu id="org.eclipse.rcp.configuration.feature.group" /> |
| <!--<iu id="org.eclipse.e4.rcp.feature.group" /> --> |
| </p2.mirror> |
| |
| <filter token="BUILD_ID" value="${buildLabel}" /> |
| <copy filtering="true" file="${builder}/templates/artifacts.xml" tofile="${buildDirectory}/formatRepo/artifacts.xml" /> |
| |
| <p2.mirror source="file:${p2.repo}" log="${buildDirectory}/${buildLabel}/mirrorLog.txt" ignoreErrors="true" > |
| <destination compressed="true" name="${p2.repo.name}" location="file:${updateSite}/${buildLabel}" append="true" format="file:${p2.repo}" kind="metadata" /> |
| <destination compressed="true" name="${p2.repo.name}" location="file:${updateSite}/${buildLabel}" append="true" format="file:${buildDirectory}/formatRepo" kind="artifact"/> |
| <comparator comparator="org.eclipse.equinox.p2.repository.tools.jar.comparator" comparatorLog="${buildDirectory}/${buildLabel}/comparatorlog.txt"> |
| <repository location="${repoBaseline}" /> |
| </comparator> |
| </p2.mirror> |
| <p2.composite.artifact.repository.add location="file://${updateSite}" child="${buildLabel}" /> |
| <p2.composite.metadata.repository.add location="file://${updateSite}" child="${buildLabel}" /> |
| |
| <antcall target="provision.e4" /> |
| |
| <!-- zip using p2.zip because it will also create md5 and sha1 sums for us --> |
| <property name="repoArchive" value="${buildDirectory}/${buildLabel}/eclipse-4.2-${buildLabel}-repository.zip"/> |
| <zip file="${repoArchive}" > |
| <fileset dir="${updateSite}/${buildLabel}" includes="**"/> |
| </zip> |
| <checksum file="${repoArchive}" algorithm="md5" pattern="{0} *{1}" todir="${buildDirectory}/${buildLabel}/checksum" /> |
| <checksum file="${repoArchive}" algorithm="sha" pattern="{0} *{1}" todir="${buildDirectory}/${buildLabel}/checksum" /> |
| <delete dir="${buildDirectory}/${buildLabel}/repository" failonerror="false" /> |
| </target> |
| |
| <macrodef name="callDirector"> |
| <attribute name="id" default="org.eclipse.sdk.ide" /> |
| <attribute name="profile" default="SDKProfile" /> |
| <attribute name="os" /> |
| <attribute name="ws" /> |
| <attribute name="arch" /> |
| <attribute name="archiveSuffix" /> |
| <attribute name="archiveFormat" /> |
| <sequential> |
| <!-- Bug 342853 - attempt to work around intermittent build failures by forking director calls |
| <ant antfile="${eclipse.pdebuild.scripts}/genericTargets.xml" target="runDirector"> |
| <property name="p2.director.installPath" value="${p2.sdk.install}.@{os}.@{ws}.@{arch}/eclipse" /> |
| <property name="p2.director.profile" value="@{profile}" /> |
| <property name="p2.director.iu" value="@{id} " /> |
| <property name="os" value="@{os}" /> |
| <property name="ws" value="@{ws}" /> |
| <property name="arch" value="@{arch}" /> |
| <property name="p2.repo" value="file:${p2.repo}" /> |
| </ant> --> |
| |
| <java jar="${equinoxLauncher}" fork="true" failonerror="false" timeout="900000" > |
| <arg line="-application org.eclipse.equinox.p2.director" /> |
| <arg line="-nosplash -consoleLog" /> |
| <arg line="-roaming -flavor ${p2.flavor} -profile @{profile}" /> |
| <arg line="-installIU @{id}" /> |
| <arg line="-p2.os @{os} -p2.ws @{ws} -p2.arch @{arch}" /> |
| <arg line="-profileProperties org.eclipse.update.install.features=true" /> |
| <arg line="-repository file:${updateSite}/${buildLabel}" /> |
| <arg line="-destination ${p2.sdk.install}.@{os}.@{ws}.@{arch}/eclipse" /> |
| <arg line="-bundlepool ${p2.sdk.install}.@{os}.@{ws}.@{arch}/eclipse" /> |
| <arg line="-shared ${p2.sdk.install}.@{os}.@{ws}.@{arch}/eclipse/p2" /> |
| </java> |
| <delete file="${buildDirectory}/${buildLabel}/eclipse-SDK-${buildLabel}-@{archiveSuffix}.@{archiveFormat}" failonerror="false" /> |
| <antcall target="p2.@{archiveFormat}"> |
| <param name="outputFolder" value="${buildDirectory}/${buildLabel}" /> |
| <param name="archiveName" value="eclipse-SDK-${buildLabel}-@{archiveSuffix}.@{archiveFormat}" /> |
| <param name="inputFolder" value="${p2.sdk.install}.@{os}.@{ws}.@{arch}" /> |
| </antcall> |
| </sequential> |
| </macrodef> |
| |
| <target name="provision.e4"> |
| <pathconvert property="equinoxLauncher" > |
| <last><sort><fileset dir="${eclipse.home}/plugins" includes="org.eclipse.equinox.launcher_*.jar" /></sort></last> |
| </pathconvert> |
| <property name="p2.sdk.install" value="${buildDirectory}/${buildId}/p2temp/sdk.install" /> |
| <parallel failonany="true" threadCount='3'> |
| <sequential> <callDirector os="win32" ws="win32" arch="x86" archiveFormat="zip" archiveSuffix="win32" /> </sequential> |
| <sequential> <callDirector os="win32" ws="win32" arch="x86_64" archiveFormat="zip" archiveSuffix="win32-x86_64" /> </sequential> |
| <sequential> <callDirector os="linux" ws="gtk" arch="x86" archiveFormat="tar" archiveSuffix="linux-gtk" /> </sequential> |
| <sequential> <callDirector os="linux" ws="gtk" arch="x86_64" archiveFormat="tar" archiveSuffix="linux-gtk-x86_64" /> </sequential> |
| <sequential> <callDirector os="linux" ws="gtk" arch="ppc64" archiveFormat="tar" archiveSuffix="linux-gtk-ppc64" /> </sequential> |
| <sequential> <callDirector os="macosx" ws="cocoa" arch="x86" archiveFormat="tar" archiveSuffix="macosx-cocoa" /> </sequential> |
| <sequential> <callDirector os="macosx" ws="cocoa" arch="x86_64" archiveFormat="tar" archiveSuffix="macosx-cocoa-x86_64" /> </sequential> |
| <sequential> <callDirector os="solaris" ws="gtk" arch="sparc" archiveFormat="zip" archiveSuffix="solaris-gtk" /> </sequential> |
| <sequential> <callDirector os="solaris" ws="gtk" arch="x86" archiveFormat="zip" archiveSuffix="solaris-gtk-x86" /> </sequential> |
| <sequential> <callDirector os="aix" ws="gtk" arch="ppc" archiveFormat="zip" archiveSuffix="aix-gtk-ppc" /> </sequential> |
| <sequential> <callDirector os="aix" ws="gtk" arch="ppc64" archiveFormat="zip" archiveSuffix="aix-gtk-ppc64" /> </sequential> |
| <sequential> <callDirector os="hpux" ws="gtk" arch="ia64_32" archiveFormat="zip" archiveSuffix="hpux-gtk-ia64_32" /> </sequential> |
| </parallel> |
| </target> |
| |
| <target name="p2.tar"> |
| <property name="fileName" value="${outputFolder}/${archiveName}"/> |
| <echo message="Building tar ${fileName}.gz from ${inputFolder}/*" /> |
| <exec dir="${inputFolder}" executable="sh"> |
| <arg line='-c "tar -cvf ${fileName} *"' /> |
| </exec> |
| <gzip zipfile="${fileName}.gz" src="${fileName}" /> |
| <delete file="${fileName}" /> |
| <delete dir="${inputFolder}" failonerror="false" /> |
| |
| <checksum file="${fileName}.gz" algorithm="md5" pattern="{0} *{1}" todir="${outputFolder}/checksum" /> |
| <checksum file="${fileName}.gz" algorithm="sha" pattern="{0} *{1}" todir="${outputFolder}/checksum" /> |
| </target> |
| |
| <target name="p2.zip"> |
| <property name="fileName" value="${outputFolder}/${archiveName}"/> |
| <chmod dir="${inputFolder}" perm="755" includes="**/*.so" /> |
| <exec dir="${inputFolder}" executable="zip"> |
| <arg line="-q ${fileName} -r ." /> |
| </exec> |
| <delete dir="${inputFolder}" failonerror="false" /> |
| |
| <checksum file="${fileName}" algorithm="md5" pattern="{0} *{1}" todir="${outputFolder}/checksum" /> |
| <checksum file="${fileName}" algorithm="sha" pattern="{0} *{1}" todir="${outputFolder}/checksum" /> |
| </target> |
| |
| <!-- ===================================================================== --> |
| <!-- Steps to do to test the build results --> |
| <!-- ===================================================================== --> |
| <target name="test"> |
| </target> |
| |
| <!-- ===================================================================== --> |
| <!-- Steps to do to publish the build results --> |
| <!-- ===================================================================== --> |
| <target name="publish"> |
| </target> |
| |
| <!-- ===================================================================== --> |
| <!-- Default target --> |
| <!-- ===================================================================== --> |
| <target name="noDefault"> |
| <echo message="You must specify a target when invoking this file" /> |
| </target> |
| |
| </project> |