blob: e45970d5f00d5c50c0867ab4f87e7a71d6f7d60d [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"/>
<import file="${allElementsFile}" />
<target name="allElements">
<antcall target="allElementsDelegator" />
</target>
<!-- ===================================================================== -->
<!-- ===================================================================== -->
<target name="getBaseComponents" depends="checkLocalBase" unless="skipBase">
</target>
<target name="checkLocalBase">
<available file="${base}" property="skipBase" />
</target>
<!-- ===================================================================== -->
<!-- Check out map files from correct repository -->
<!-- Replace values for mapsCheckoutTag as desired. -->
<!-- ===================================================================== -->
<target name="getMapFiles" depends="checkLocalMaps" unless="skipMaps">
<property name="mapsCheckoutTag" value="HEAD" />
<cvs cvsRoot="${mapsRepo}" package="${mapsRoot}" dest="${buildDirectory}/maps" tag="${mapsCheckoutTag}" />
<antcall target="tagMapFiles" />
</target>
<target name="checkLocalMaps">
<available property="skipMaps" file="${buildDirectory}/maps" />
</target>
<target name="tagMapFiles" if="tagMaps">
<cvs dest="${buildDirectory}/maps/${mapsRoot}" 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>
<copy todir="${buildDirectory}/${buildLabel}/compilelogs" overwrite="true" failonerror="false">
<fileset dir="${buildDirectory}/features/org.eclipse.e4.resources.feature/feature.temp.folder" />
</copy>
<copy todir="${buildDirectory}/${buildLabel}/compilelogs" overwrite="true" failonerror="false">
<fileset dir="${buildDirectory}/features/org.eclipse.e4.master/feature.temp.folder" />
</copy>
<copy todir="${buildDirectory}/${buildLabel}/compilelogs" overwrite="true" failonerror="false">
<fileset dir="${buildDirectory}/features/org.eclipse.e4.sdk.runtime.feature/feature.temp.folder" />
</copy>
<copy todir="${buildDirectory}/${buildLabel}/compilelogs" overwrite="true" failonerror="false">
<fileset dir="${buildDirectory}/features/org.eclipse.e4.sdk.source.feature/feature.temp.folder" />
</copy>
</target>
<!-- ===================================================================== -->
<!-- Steps to do before setup -->
<!-- ===================================================================== -->
<target name="preSetup">
</target>
<!-- ===================================================================== -->
<!-- Steps to do after setup but before starting the build proper -->
<!-- ===================================================================== -->
<target name="postSetup">
<antcall target="getBaseComponents" />
<p2.mirror destination="${transformedRepoLocation}-mirrored">
<source>
<repository location="${eclipsep2Repo}" />
</source>
<slicingOptions latestVersionOnly="true"/>
<iu id="org.eclipse.sdk.feature.group"/>
<iu id="org.eclipse.equinox.p2.user.ui.feature.group"/>
<iu id="org.eclipse.rcp.configuration.feature.group"/>
<!--iu id="org.eclipse.emf.sdk.feature.group"/-->
<!--iu id="org.eclipse.wst.xml_ui.feature.feature.group"/-->
<!--iu id="org.eclipse.gef.feature.group"/-->
</p2.mirror>
<!--unjar src="${transformedRepoLocation}-mirrored/content.jar" dest="${transformedRepoLocation}-mirrored"/>
<xslt style="${builder}/fix-ibuild.xsl" in="${transformedRepoLocation}-mirrored/content.xml" out="${transformedRepoLocation}-mirrored/out_content.xml">
<outputproperty name="method" value="xml"/>
</xslt>
<move file="${transformedRepoLocation}-mirrored/out_content.xml" tofile="${transformedRepoLocation}-mirrored/content.xml" />
<jar destfile="${transformedRepoLocation}-mirrored/content.jar"
includes="content.xml"
basedir="${transformedRepoLocation}-mirrored"
update="true"/>
<delete file="${transformedRepoLocation}-mirrored/content.xml"/-->
<echo>${eclipsep2Repo}</echo>
<echo>${emfp2Repo}</echo>
<echo>${gefp2Repo}</echo>
<echo>${wstp2Repo}</echo>
<echo>Running against helios I builds: ${transformedRepoLocation} </echo>
<p2.repo2runnable destination="${transformedRepoLocation}" failOnError="false">
<source>
<repository location="file:${transformedRepoLocation}-mirrored" />
<repository location="${emfp2Repo}" />
<repository location="${gefp2Repo}" />
<repository location="${wstp2Repo}" />
</source>
</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">
</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" />
<eclipse.convert input="${buildDirectory}/${buildLabel}/compilelogs" />
<xslt style="${builder}/patch-ver.xsl" in="${p2.repo}/content.xml" out="${p2.repo}/out_content.xml">
<outputproperty name="method" value="xml"/>
</xslt>
<move file="${p2.repo}/out_content.xml" tofile="${p2.repo}/content.xml" />
<tstamp>
<format property="repmaindate" pattern="yyyy MMMM dd HH:mm" locale="en"/>
</tstamp>
<copy file="${builder}/../../templates/dl-icon-update-zip.gif" tofile="${buildDirectory}/${buildLabel}/dl-icon-update-zip.gif" />
<copy file="${builder}/../../templates/FAIL.gif" tofile="${buildDirectory}/${buildLabel}/FAIL.gif" />
<copy file="${builder}/../../templates/new.gif" tofile="${buildDirectory}/${buildLabel}/new.gif" />
<copy file="${builder}/../../templates/OK.gif" tofile="${buildDirectory}/${buildLabel}/OK.gif" />
<copy file="${builder}/../../templates/build.download.php" tofile="${buildDirectory}/${buildLabel}/download.php" />
<copy file="${buildDirectory}/directory.txt" todir="${buildDirectory}/${buildLabel}" />
<move file="${buildDirectory}/${buildLabel}/${topLevelElementId}-${buildId}-group.group.group.zip" tofile="${buildDirectory}/${buildLabel}/${topLevelElementId}-${buildLabel}.zip" />
<zip destfile="${buildDirectory}/${buildLabel}/eclipse-e4-repo-incubation-${buildLabel}.zip" basedir="${p2.repo}"></zip>
<length file="${buildDirectory}/${buildLabel}/eclipse-e4-repo-incubation-${buildLabel}.zip" property="repobuildsize"/>
<filter token="repbuildid" value="${buildLabel}"/>
<filter token="repmaindate" value="${repmaindate}"/>
<filter token="repbuilddate" value="${buildLabel}"/>
<filter token="repobuildsize" value="${repobuildsize}"/>
<filter token="timestamp" value="${timestamp}"/>
<filter token="buildType" value="${buildType}"/>
<filter token="buildId" value="${buildId}"/>
<filter token="buildLabel" value="${buildLabel}"/>
<filter token="eclipseIbuild" value="${eclipseBuildId}"/>
<filter token="emfBuildId" value="${emfBuildId}"/>
<filter token="eclipsep2Repo" value="${eclipsep2Repo}"/>
<filter token="emfp2Repo" value="${emfp2Repo}"/>
<filter token="gefp2Repo" value="${gefp2Repo}"/>
<filter token="wstp2Repo" value="${wstp2Repo}"/>
<filter token="wstBuildDir" value="${wstBuildDir}"/>
<copy filtering="true" file="${builder}/../../templates/build.index.html" tofile="${buildDirectory}/${buildLabel}/index.html" />
<copy filtering="true" file="${builder}/tests/build.label.properties" tofile="${buildDirectory}/label.properties" />
<generateTestProperties
buildDirectory="${buildDirectory}"
featureId="org.eclipse.e4.resources.tests.feature"
outputFile="${buildDirectory}/test.properties"
/>
<generateTestProperties
buildDirectory="${buildDirectory}"
featureId="org.eclipse.e4.swt.as.tests.feature"
outputFile="${buildDirectory}/test.properties"
/>
<generateTestProperties
buildDirectory="${buildDirectory}"
featureId="org.eclipse.e4.ui.tests.feature"
outputFile="${buildDirectory}/test.properties"
/>
<generateTestProperties
buildDirectory="${buildDirectory}"
featureId="org.eclipse.e4.xwt.tests.feature"
outputFile="${buildDirectory}/test.properties"
/>
<generateTestProperties
buildDirectory="${buildDirectory}"
featureId="org.eclipse.e4.languages.tests.feature"
outputFile="${buildDirectory}/test.properties"
/>
<generateTestProperties
buildDirectory="${buildDirectory}"
featureId="org.eclipse.e4.tm.tests.feature"
outputFile="${buildDirectory}/test.properties"
/>
<property name="buildlogs" value="${buildDirectory}/${buildLabel}" />
<property name="p2.root" value="${buildDirectory}/${buildId}/p2temp" />
<mkdir dir="${p2.root}" />
<property name="p2.output.base" value="${p2.root}/equinox.p2.build" />
<mkdir dir="${p2.output.base}" />
<property name="directorlog" value="${buildlogs}/director.txt" />
<property name="p2.sdk.install.win32.win32.x86" value="${p2.output.base}/sdk.install.win32.win32.x86" />
<mkdir dir="${p2.sdk.install.win32.win32.x86}" />
<property name="p2.sdk.install.linux.gtk.x86" value="${p2.output.base}/sdk.install.linux.gtk.x86" />
<mkdir dir="${p2.sdk.install.linux.gtk.x86}" />
<property name="p2.sdk.install.linux.gtk.ppc" value="${p2.output.base}/sdk.install.linux.gtk.ppc" />
<mkdir dir="${p2.sdk.install.linux.gtk.ppc}" />
<property name="p2.sdk.install.macosx.cocoa.x86" value="${p2.output.base}/sdk.install.macosx.cocoa.x86" />
<mkdir dir="${p2.sdk.install.macosx.cocoa.x86}" />
<antcall target="run.category.generation"/>
<antcall target="e4.product"/>
<antcall target="provision.e4"/>
<antcall target="zip.install"/>
</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>
<target name="run.director">
<delete dir="${base.builder}/configuration/.settings" includeemptydirs="true" failonerror="false" />
<!-- <copy file="${equinox.build.configs}/equinox.prov/files/config.ini.director" tofile="${base.builder}/configuration/config.ini" overwrite="true" /> -->
<exec executable="${java15-home}/bin/java" failonerror="false" dir="${base.builder}" timeout="900000" output="${directorlog}" resultproperty="directorcode">
<arg line="-jar ${base.builder.launcher}" />
<arg line="-application org.eclipse.equinox.p2.director" />
<arg line="-nosplash" />
<arg line="-consoleLog" />
<arg line="-flavor ${p2.flavor}" />
<arg line="-installIU ${p2.director.installIU}" />
<arg line="-p2.os ${p2.os}" />
<arg line="-p2.ws ${p2.ws}" />
<arg line="-p2.arch ${p2.arch}" />
<arg line="-roaming" />
<arg line="-profile ${p2.director.profile}" />
<arg line="${p2.director.extraArgs}" />
<arg line="-repository file:${transformedRepoLocation},file:${p2.repo}" />
<arg line="-destination ${p2.director.install.path}" />
<arg line="-bundlepool ${p2.director.install.path}" />
</exec>
<echo message="director ${p2.director.install.path}" file="${directorlog}" append="true" />
<echo message="${directorcode}" file="${directorlog}" append="true" />
</target>
<target name="run.category.generation">
<delete dir="${base.builder}/configuration/.settings" includeemptydirs="true" failonerror="false" />
<!-- <copy file="${equinox.build.configs}/equinox.prov/files/config.ini.director" tofile="${base.builder}/configuration/config.ini" overwrite="true" /> -->
<exec executable="${java15-home}/bin/java" failonerror="false" dir="${base.builder}" timeout="900000" output="${directorlog}" resultproperty="directorcode">
<arg line="-jar ${base.builder.launcher}" />
<arg line="-application org.eclipse.equinox.p2.publisher.CategoryPublisher" />
<arg line="-nosplash" />
<arg line="-consoleLog" />
<arg line="-metadataRepository file:${p2.repo}" />
<arg line="-categoryDefinition file:${builder}/e4-category.xml" />
<arg line="-categoryQualifier" />
</exec>
<echo message="director ${p2.director.install.path}" file="${directorlog}" append="true" />
<echo message="${directorcode}" file="${directorlog}" append="true" />
</target>
<target name="e4.product">
<replace token="@qualifier@" file="${buildDirectory}/plugins/org.eclipse.e4.ui.examples.legacy.workbench/legacy-eclipse.product" value="${buildLabel}" />
<p2.publish.product flavor="tooling" repository="file:${p2.repo}" productFile="${buildDirectory}/plugins/org.eclipse.e4.ui.examples.legacy.workbench/legacy-eclipse.product" compress="true">
<config os="win32" ws="win32" arch="x86" />
<config os="linux" ws="gtk" arch="x86" />
<config os="linux" ws="gtk" arch="ppc" />
<config os="macosx" ws="cocoa" arch="x86" />
<advice kind="featureVersions" file="${buildDirectory}/finalFeaturesVersions.properties" />
<advice kind="pluginVersions" file="${buildDirectory}/finalPluginsVersions.properties" />
<contextrepository location="file:${transformedRepoLocation}" artifact="true" metadata="true"/>
</p2.publish.product>
</target>
<target name="provision.e4">
<antcall target="run.director">
<param name="p2.director.installIU" value="org.eclipse.e4.workbench.sdk" />
<param name="p2.director.version" value="3.5.0.${buildId}" />
<param name="p2.director.profile" value="SDKProfile" />
<param name="p2.director.install.path" value="${p2.sdk.install.win32.win32.x86}/eclipse" />
<param name="p2.director.extraArgs" value="-profileProperties org.eclipse.update.install.features=true" />
<param name="p2.os" value="win32" />
<param name="p2.ws" value="win32" />
<param name="p2.arch" value="x86" />
</antcall>
<antcall target="run.director">
<param name="p2.director.installIU" value="org.eclipse.e4.workbench.sdk" />
<param name="p2.director.version" value="3.5.0.${buildId}" />
<param name="p2.director.profile" value="SDKProfile" />
<param name="p2.director.install.path" value="${p2.sdk.install.linux.gtk.x86}/eclipse" />
<param name="p2.director.extraArgs" value="-profileProperties org.eclipse.update.install.features=true" />
<param name="p2.os" value="linux" />
<param name="p2.ws" value="gtk" />
<param name="p2.arch" value="x86" />
</antcall>
<antcall target="run.director">
<param name="p2.director.installIU" value="org.eclipse.e4.workbench.sdk" />
<param name="p2.director.version" value="3.5.0.${buildId}" />
<param name="p2.director.profile" value="SDKProfile" />
<param name="p2.director.install.path" value="${p2.sdk.install.linux.gtk.ppc}/eclipse" />
<param name="p2.director.extraArgs" value="-profileProperties org.eclipse.update.install.features=true" />
<param name="p2.os" value="linux" />
<param name="p2.ws" value="gtk" />
<param name="p2.arch" value="ppc" />
</antcall>
<antcall target="run.director">
<param name="p2.director.installIU" value="org.eclipse.e4.workbench.sdk" />
<param name="p2.director.version" value="3.5.0.${buildId}" />
<param name="p2.director.profile" value="SDKProfile" />
<param name="p2.director.install.path" value="${p2.sdk.install.macosx.cocoa.x86}/eclipse" />
<param name="p2.director.extraArgs" value="-profileProperties org.eclipse.update.install.features=true" />
<param name="p2.os" value="macosx" />
<param name="p2.ws" value="cocoa" />
<param name="p2.arch" value="x86" />
</antcall>
</target>
<target name="zip.install">
<property name="output.dir" value="${buildDirectory}/${buildLabel}" />
<mkdir dir="${output.dir}" />
<parallel failonany="true" threadCount='4'>
<sequential>
<!-- win32 win32 x86 -->
<delete file="${buildDirectory}/${buildLabel}/eclipse-e4-SDK-incubation-${buildLabel}-win32.zip" failonerror="false" />
<exec dir="${p2.sdk.install.win32.win32.x86}" executable="zip">
<arg line="-q ${buildDirectory}/${buildLabel}/eclipse-e4-SDK-incubation-${buildLabel}-win32.zip -r ." />
</exec>
<!--antcall target="generateChecksums">
<param name="archiveName" value="eclipse-e4-SDK-incubation-${buildLabel}-win32.zip" />
</antcall-->
</sequential>
<sequential>
<!-- linux gtk x86 -->
<antcall target="p2.tar">
<param name="tar.base.dir" value="${p2.sdk.install.linux.gtk.x86}" />
<param name="tar.base.filename" value="${buildDirectory}/${buildLabel}/eclipse-e4-SDK-incubation-${buildLabel}-linux-gtk.tar" />
</antcall>
<!--antcall target="generateChecksums">
<param name="archiveName" value="eclipse-e4-SDK-incubation-${buildLabel}-linux-gtk.tar.gz" />
</antcall-->
</sequential>
<sequential>
<!-- linux gtk ppc-->
<antcall target="p2.tar">
<param name="tar.base.dir" value="${p2.sdk.install.linux.gtk.ppc}" />
<param name="tar.base.filename" value="${buildDirectory}/${buildLabel}/eclipse-e4-SDK-incubation-${buildLabel}-linux-gtk-ppc.tar" />
</antcall>
<!--antcall target="generateChecksums">
<param name="archiveName" value="eclipse-e4-SDK-incubation-${buildLabel}-linux-gtk-ppc.tar.gz" />
</antcall-->
</sequential>
<sequential>
<!-- macosx -->
<!-- temp fix for https://bugs.eclipse.org/bugs/show_bug.cgi?id=223319 -->
<delete file="${p2.sdk.install.macosx.cocoa.x86}/eclipse/eclipse" failonerror="false" />
<exec dir="${p2.sdk.install.macosx.cocoa.x86}/eclipse" executable="ln">
<arg line="-s Eclipse.app/Contents/MacOS/eclipse eclipse" />
</exec>
<antcall target="p2.tar">
<param name="tar.base.dir" value="${p2.sdk.install.macosx.cocoa.x86}" />
<param name="tar.base.filename" value="${buildDirectory}/${buildLabel}/eclipse-e4-SDK-incubation-${buildLabel}-macosx-cocoa.tar" />
</antcall>
<!--antcall target="generateChecksums">
<param name="archiveName" value="eclipse-e4-SDK-incubation-${buildLabel}-macosx-cocoa.tar.gz" />
</antcall-->
</sequential>
</parallel>
</target>
<target name="p2.tar">
<echo message="Building tar ${tar.base.filename} from ${tar.base.dir}/*" />
<exec dir="${tar.base.dir}" executable="sh">
<arg line='-c "tar -cvf ${tar.base.filename} *"' />
</exec>
<gzip zipfile="${tar.base.filename}.gz" src="${tar.base.filename}" />
<delete file="${tar.base.filename}" />
</target>
<target name="find.a.file">
<fileset id="base.launcher.file" dir="${base.builder}">
<filename name="plugins/org.eclipse.equinox.launcher_*.jar"/>
</fileset>
<property name="base.launcher" refid="base.launcher.file"/>
<echo>${base.launcher}</echo>
</target>
</project>