| <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" /> |
| <loadproperties srcfile="${builder}/update_repo.properties" /> |
| <property name="transformedRepoLocation" value="${targetDir}/${targetDownloadId}" /> |
| <property name="repoBaseLocation" value="${targetDir}/${targetDownloadId}-p2" /> |
| <property name="updateSite" value="${targetDir}/updates/0.12-I-builds" /> |
| <property name="repoBaseline" value="${updateSite}" /> |
| |
| |
| <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"> |
| <mkdir dir="${buildDirectory}/maps" /> |
| <copy todir="${buildDirectory}/maps"> |
| <fileset dir="${builder}/../../.." /> |
| </copy> |
| </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> |
| |
| <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"> |
| <antcall target="getBaseComponents" /> |
| |
| <echo message="Mirror from ${eclipseRepoURL-latest} to ${repoBaseLocation}/eclipseSDK" /> |
| <p2.mirror destination="file:${repoBaseLocation}/eclipseSDK" ignoreerrors="true"> |
| <source location="${eclipseRepoURL-latest}" /> |
| <slicingOptions includeOptional="false" includeNonGreedy="false" latestVersionOnly="true"/> |
| <iu id="org.eclipse.sdk.ide" /> |
| <iu id="org.eclipse.equinox.concurrent" /> |
| <!--<iu id="org.eclipse.equinox.core.sdk.feature.group" /> --> |
| </p2.mirror> |
| |
| <echo message="Mirror from ${orbitRepoURL} to ${repoBaseLocation}/orbit" /> |
| <p2.mirror destination="file:${repoBaseLocation}/orbit" ignoreerrors="true"> |
| <source location="${orbitRepoURL}" /> |
| <slicingOptions includeOptional="false" includeNonGreedy="false" /> |
| <iu id="org.apache.commons.beanutils" /> |
| <iu id="org.apache.commons.lang" /> |
| <iu id="org.junit" version="0.0.0" /> |
| <iu id="org.junit.source" version="0.0.0" /> |
| <iu id="org.easymock" /> |
| <iu id="org.jmock" /> |
| <iu id="org.mockito" /> |
| <iu id="javax.el" /> |
| </p2.mirror> |
| |
| <echo message="Mirror from ${emfRepoURL} to ${repoBaseLocation}/emf" /> |
| <p2.mirror destination="file:${repoBaseLocation}/emf" ignoreerrors="true"> |
| <source location="${emfRepoURL}" /> |
| <slicingOptions includeOptional="false" includeNonGreedy="false" latestVersionOnly="true" /> |
| <iu id="org.eclipse.emf.sdk.feature.group" /> |
| <iu id="org.eclipse.xsd.edit.feature.group" /> |
| </p2.mirror> |
| |
| <echo message="Mirror from ${gefRepoURL} to ${repoBaseLocation}/gef" /> |
| <p2.mirror destination="file:${repoBaseLocation}/gef" ignoreerrors="true"> |
| <source location="${gefRepoURL}" /> |
| <slicingOptions includeOptional="false" includeNonGreedy="false" /> |
| <iu id="org.eclipse.gef.feature.group" /> |
| </p2.mirror> |
| |
| <echo message="Mirror from ${wtpRepoURL} to ${repoBaseLocation}/wtp" /> |
| <p2.mirror destination="file:${repoBaseLocation}/wtp" ignoreerrors="true"> |
| <source location="${wtpRepoURL}" /> |
| <slicingOptions includeOptional="false" includeNonGreedy="false" /> |
| <iu id="org.eclipse.wst.xml_ui.feature.feature.group" /> |
| <iu id="org.eclipse.wst.web_core.feature.feature.group" /> |
| </p2.mirror> |
| |
| <echo message="Mirror from ${xtextRepoURL} to ${repoBaseLocation}/xtext" /> |
| <p2.mirror destination="file:${repoBaseLocation}/xtext" ignoreerrors="true"> |
| <source location="${xtextRepoURL}" /> |
| <slicingOptions includeOptional="false" includeNonGreedy="false" latestVersionOnly="true" /> |
| <iu id="org.eclipse.xtext.sdk.feature.group" /> |
| </p2.mirror> |
| |
| <echo message="Mirror from ${swtbotRepoURL} to ${repoBaseLocation}/swtbot" /> |
| <p2.mirror destination="file:${repoBaseLocation}/swtbot" ignoreerrors="true"> |
| <source location="${swtbotRepoURL}" /> |
| <slicingOptions includeOptional="false" includeNonGreedy="false" latestVersionOnly="true" /> |
| <iu id="org.eclipse.swtbot.eclipse.core" /> |
| <iu id="org.eclipse.swtbot.eclipse.finder" /> |
| <iu id="org.eclipse.swtbot.junit4_x" /> |
| <iu id="org.eclipse.swtbot.swt.finder" /> |
| </p2.mirror> |
| |
| <p2.remove.iu> |
| <repository location="file:${repoBaseLocation}/xtext" /> |
| <iu id="osgi.enterprise" /> |
| <iu id="org.eclipse.wb.core.lib" /> |
| </p2.remove.iu> |
| |
| <!--<p2.remove.iu> |
| <repository location="file:${targetDir}/${targetDownloadId}-p2" /> |
| <iu id="org.eclipse.rap.jface" /> |
| <iu id="org.eclipse.rap.rwt" /> |
| <iu id="org.eclipse.rap.ui.forms" /> |
| </p2.remove.iu>--> |
| |
| <p2.repo2runnable destination="${transformedRepoLocation}" failOnError="false"> |
| <source dir="${repoBaseLocation}" includes="*" excludes="${repoBaseLocation.excludes}"/> |
| </p2.repo2runnable> |
| </target> |
| |
| <!-- ===================================================================== --> |
| <!-- Steps to do before fetching the build elements --> |
| <!-- ===================================================================== --> |
| <target name="preFetch"> |
| <echo message="Filtering map files..." /> |
| <!-- run against base repo instead of the transformed repo, so we don't worry about checking directories --> |
| <fileset dir="${repoBaseLocation}/eclipseSDK/plugins" includes="*" id="filter.plugins" /> |
| <property name="mapFile" value="${buildDirectory}/directory.txt" /> |
| <script language="javascript"> <![CDATA[ |
| importClass(java.io.FileInputStream); |
| importClass(java.io.FileOutputStream); |
| importClass(java.util.Properties); |
| importClass(java.lang.System); |
| |
| var mapFile = project.getProperty("mapFile"); |
| |
| var map = new Properties(); |
| map.load(new FileInputStream(mapFile)); |
| |
| var fs = project.getReference("filter.plugins"); |
| var files = fs.getDirectoryScanner(project).getIncludedFiles(); |
| |
| for(i = 0; i < files.length; i++) { //14 |
| var name = files[i].match(/([^_]*((_64)|(_32))?[^_]*)_.*/)[1]; |
| if (map.containsKey("plugin@" + name)) { |
| System.out.println("Removed plugin@" + name); |
| map.remove("plugin@" + name); |
| } else if (map.containsKey("fragment@" + name)) { |
| System.out.println("Removed fragment@" + name); |
| map.remove("fragment@" + name); |
| } |
| } |
| |
| var out = new FileOutputStream(mapFile); |
| map.store(out, "Filtered"); |
| out.close(); |
| ]]></script> |
| </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> |
| |
| <target name="unzipContentJar" if="contentJar"> |
| <unzip src="${p2.repo}/content.jar" dest="${p2.repo}" /> |
| <delete file="${p2.repo}/content.jar" /> |
| </target> |
| <!-- ===================================================================== --> |
| <!-- Steps to do after the build is done. --> |
| <!-- ===================================================================== --> |
| <target name="postBuild" depends="initLocations"> |
| <antcall target="gatherLogs" /> |
| <eclipse.convert input="${buildDirectory}/${buildLabel}/compilelogs" /> |
| <available file="${p2.repo}/content.jar" property="contentJar" /> |
| <antcall target="unzipContentJar" /> |
| <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" /> |
| |
| <!--sign the build --> |
| <ant antfile="${builder}/sign.xml" dir="${basedir}" target="createSigningArchive" > |
| <property name="includesFile" value="${buildDirectory}/built.list" /> |
| </ant> |
| <ant antfile="${builder}/sign.xml" dir="${basedir}" target="signMasterFeature" /> |
| |
| <!--unzip signed build into repository for mirroring and packaging--> |
| <unzip dest="${p2.repo}" src="${buildDirectory}/${buildLabel}/eclipse-master-${buildId}.zip" /> |
| |
| <!--pack master feature and update repository with new checksums for signed bundles --> |
| <p2.process.artifacts repositoryPath="file://${p2.repo}" /> |
| <delete file="${p2.repo}/pack.properties" /> |
| |
| <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" 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}" /> |
| |
| <!--p2.composite.repository location="file:${updateSite}" > |
| <add location="${buildLabel}" /> |
| </p2.composite.repository--> |
| |
| <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}" /> |
| |
| <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" /> |
| |
| |
| <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" /> |
| |
| <delete file="${buildDirectory}/version.properties" /> |
| <antcall target="run.version.query"> |
| <param name="list.repo" value="file:${p2.sdk.install.linux.gtk.x86_64}/eclipse/p2/org.eclipse.equinox.p2.engine/profileRegistry/SDKProfile.profile" /> |
| <param name="list.iu" value="org.eclipse.e4.workbench.sdk,org.eclipse.emf,org.eclipse.gef,org.eclipse.sdk,org.eclipse.wst.jsdt.ui,org.eclipse.xsd,org.eclipse.wst.xml_ui.feature.feature.group" /> |
| </antcall> |
| <property file="${buildDirectory}/version.properties" /> |
| |
| <!-- generate the build index, guess the component version numbers --> |
| <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="${org.eclipse.sdk}" /> |
| <filter token="emfBuildId" value="${org.eclipse.emf}" /> |
| <filter token="gefBuildId" value="${org.eclipse.gef}" /> |
| <filter token="eclipseBuildURL" value="${eclipseRepoURL-latest}" /> |
| <filter token="emfBuildURL" value="${emfBuildURL}" /> |
| <filter token="gefBuildURL" value="${gefBuildURL}" /> |
| <filter token="wtpBuildURL" value="${wtpBuildURL}" /> |
| <filter token="wtpBuildId" value="${wtpBuildId}" /> |
| <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" /> |
| |
| <echo message="e4.targetDir=${repoBaseLocation}${line.separator}" file="${buildDirectory}/label.properties" append="true" /> |
| </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.version.query"> |
| <delete dir="${base.builder}/configuration/.settings" includeemptydirs="true" failonerror="false" /> |
| <exec executable="${java15-home}/bin/java" failonerror="false" dir="${base.builder}" timeout="900000" output="${buildDirectory}/version.properties" error="/dev/null"> |
| <arg line="-jar ${base.builder.launcher}" /> |
| <arg line="-application org.eclipse.equinox.p2.director" /> |
| <arg line="-nosplash" /> |
| <arg line="-repository ${list.repo}" /> |
| <arg line="-list ${list.iu}" /> |
| </exec> |
| </target> |
| |
| </project> |
| |