blob: 105cd1c89c35c122e23f6786ac1ff25b9c48ede5 [file] [log] [blame]
<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">
<property name="mapsCheckoutTag" value="HEAD" />
<cvs cvsRoot="${mapsRepo}" package="${mapsRoot_sdk}" dest="${buildDirectory}/maps" tag="${mapsCheckoutTag}" />
<cvs cvsRoot="${mapsRepo}" package="${mapsRoot_e4}" dest="${buildDirectory}/maps" tag="${mapsCheckoutTag}" />
<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">
</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 destination="file:${localRepoLocation}" ignoreerrors="true">
<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>
<echo message="Mirror from ${indigoRepoURL} to ${localRepoLocation}" />
<p2.mirror destination="file:${localRepoLocation}" ignoreerrors="true">
<source location="${indigoRepoURL}" />
<slicingOptions includeOptional="false" includeNonGreedy="false" latestVersionOnly="true" />
<iu id="org.apache.commons.beanutils" />
</p2.mirror>
</target>
<!-- ===================================================================== -->
<!-- Steps to do before fetching the build elements -->
<!-- ===================================================================== -->
<target name="preFetch">
</target>
<!-- ===================================================================== -->
<!-- Steps to do after fetching the build elements -->
<!-- ===================================================================== -->
<target name="postFetch">
<!-- 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>
</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>
<!-- ===================================================================== -->
<!-- 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" />
<replace token="@qualifier@" file="${eclipse.build.configs}/sdk/builder/sdk.product" value="${buildLabel}" />
<echo message="Publishing ${eclipse.build.configs}/sdk/builder/sdk.product to file:${p2.repo}" />
<p2.publish.product flavor="tooling" repository="file:${p2.repo}" productFile="${eclipse.build.configs}/sdk/builder/sdk.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>
<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" />
</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>
<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>
<delete file="${buildDirectory}/${buildLabel}/eclipse-SDK-${buildLabel}-@{archiveSuffix}.@{archiveFormat}" failonerror="false" />
<antcall target="p2.@{archiveFormat}">
<param name="fileName" value="${buildDirectory}/${buildLabel}/eclipse-SDK-${buildLabel}-@{archiveSuffix}.@{archiveFormat}" />
<param name="inputFolder" value="${p2.sdk.install}.@{os}.@{ws}.@{arch}" />
</antcall>
</sequential>
</macrodef>
<target name="provision.e4">
<property name="p2.sdk.install" value="${buildDirectory}/${buildId}/p2temp/sdk.install" />
<parallel failonany="true" threadCount='4'>
<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>
</parallel>
</target>
<target name="p2.tar">
<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}" />
</target>
<target name="p2.zip">
<exec dir="${inputFolder}" executable="zip">
<arg line="-q ${fileName} -r ." />
</exec>
</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>