blob: ad259181be98fc76a2d9513a46d5f1dcfb253e01 [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" />
<loadproperties srcfile="${builder}/update_repo.properties" />
<property name="transformedRepoLocation" value="${targetDir}/${targetDownloadId}" />
<property name="updateSite" value="${targetDir}/updates/0.11-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">
<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" />
<echo message="Mirror from XXX to ${targetDir}/helios-repo-${targetDownloadId}" />
<p2.mirror destination="${targetDir}/helios-repo-${targetDownloadId}" ignoreerrors="true">
<source location="http://download.eclipse.org/eclipse/updates/3.7-I-builds" />
<slicingOptions includeOptional="false" includeNonGreedy="false" />
<iu id="org.eclipse.sdk.ide" />
<iu id="org.eclipse.equinox.core.sdk.feature.group" />
</p2.mirror>
<p2.mirror destination="${targetDir}/helios-repo-${targetDownloadId}" ignoreerrors="true">
<source location="http://download.eclipse.org/releases/indigo" />
<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" />
<iu id="org.eclipse.emf.sdk.feature.group" />
<iu id="org.eclipse.xsd.edit.feature.group" />
<iu id="org.apache.commons.beanutils" />
<iu id="org.apache.commons.lang" />
<iu id="javax.el" />
</p2.mirror>
<p2.remove.iu>
<repository location="file:${targetDir}/helios-repo-${targetDownloadId}" />
<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>
<repository location="file:${targetDir}/helios-repo-${targetDownloadId}" />
</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>
<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">
<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 -->
<antcall target="signMasterFeature" />
<!--unzip signed build into repository for mirroring and packaging-->
<property name="p2.repo.unsigned" value="${p2.repo}.unsigned" />
<mkdir dir="${p2.repo.unsigned}" />
<move todir="${p2.repo.unsigned}">
<fileset dir="${p2.repo}" />
</move>
<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}" pack="true" />
<delete>
<fileset dir="${p2.repo}">
<include name="pack.properties" />
</fileset>
</delete>
<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}" />
<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" />
<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}" />
<antcall target="e4.product" />
<antcall target="provision.e4" />
<antcall target="zip.install" />
<delete file="${buildDirectory}/version.properties" />
<antcall target="run.version.query">
<param name="list.repo" value="file:${p2.sdk.install.linux.gtk.ppc}/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="${eclipseBuildURL}" />
<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" />
</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="initLauncher" unless="base.builder.launcher">
<path id="launcher.path">
<last count="1"><sort>
<fileset dir="${eclipse.home}" includes="**/org.eclipse.equinox.launcher_*.jar" />
</sort></last>
</path>
<property name="base.builder.launcher" refid="launcher.path" />
</target>
<target name="run.director" depends="initLauncher">
<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" />
<!-- ant antfile="${genericTargets}" target="runDirector" inheritAll="true">
<property name="equinoxLauncherJar" value="${base.builder.launcher}"/>
<property name="p2.repo" value="${p2.build.repo},file:${transformedRepoLocation}"/>
<property name="p2.director.iu" value="${p2.director.installIU}"/>
<property name="p2.director.installPath" value="${p2.director.install.path}"/>
<property name="os" value="${p2.os}" />
<property name="ws" value="${p2.ws}" />
<property name="arch" value="${p2.arch}" />
</ant -->
</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>
<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="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="macosx" ws="cocoa" arch="x86" />
<config os="macosx" ws="cocoa" arch="x86_64" />
<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.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.profile" value="SDKProfile" />
<param name="p2.director.install.path" value="${p2.sdk.install.win32.win32.x86_64}/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_64" />
</antcall>
<antcall target="run.director">
<param name="p2.director.installIU" value="org.eclipse.e4.workbench.sdk" />
<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.profile" value="SDKProfile" />
<param name="p2.director.install.path" value="${p2.sdk.install.linux.gtk.x86_64}/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_64" />
</antcall>
<!--
<antcall target="run.director">
<param name="p2.director.installIU" value="org.eclipse.e4.workbench.sdk" />
<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.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>
<antcall target="run.director">
<param name="p2.director.installIU" value="org.eclipse.e4.workbench.sdk" />
<param name="p2.director.profile" value="SDKProfile" />
<param name="p2.director.install.path" value="${p2.sdk.install.macosx.cocoa.x86_64}/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_64" />
</antcall>
-->
</target>
<target name="zip.install">
<property name="output.dir" value="${buildDirectory}/${buildLabel}" />
<mkdir dir="${output.dir}" />
<parallel failonany="true" threadCount='4'>
<sequential>
<!-- linux gtk x86_64 -->
<antcall target="p2.tar">
<param name="tar.base.dir" value="${p2.sdk.install.linux.gtk.x86_64}" />
<param name="tar.base.filename" value="${buildDirectory}/${buildLabel}/eclipse-e4-SDK-incubation-${buildLabel}-linux-gtk-x86_64.tar" />
</antcall>
<!--antcall target="generateChecksums">
<param name="archiveName" value="eclipse-e4-SDK-incubation-${buildLabel}-linux-gtk-ppc.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>
<!--target name="signMasterFeature" if="sign"-->
<target name="signMasterFeature">
<property name="packtmp" value="${buildDirectory}/packtmp" />
<property name="stagingDirectoryOutput" value="/home/data/httpd/download-staging.priv/eclipse/e4/${buildId}-out" />
<property name="stagingDirectory" value="/home/data/httpd/download-staging.priv/eclipse/e4" />
<property name="archiveName" value="eclipse-master-${buildId}.zip" />
<property name="outputFile" value="${stagingDirectoryOutput}/${archiveName}" />
<mkdir dir="${packtmp}" />
<zip zipfile="${buildDirectory}/${buildLabel}/${archiveName}" basedir="${p2.repo}" />
<!--update pack.properties to exclude Orbit bundles from being signed and packed -->
<antcall target="updatePackProperties" />
<move file="${buildDirectory}/${buildLabel}/${archiveName}" tofile="${packtmp}/${archiveName}" />
<!--push drop to staging directory-->
<echo message="push drop to staging directory" />
<condition property="signcopy" value="cp">
<equals arg1="${hudson}" arg2="true" />
</condition>
<property name="signcopy" value="scp" />
<condition property="signexec" value="/bin/bash">
<equals arg1="${hudson}" arg2="true" />
</condition>
<property name="signexec" value="ssh" />
<condition property="signUser" value="">
<equals arg1="${hudson}" arg2="true" />
</condition>
<property name="signUser" value="pwebster@" />
<condition property="signhost" value="">
<equals arg1="${hudson}" arg2="true" />
</condition>
<property name="signhost" value="build.eclipse.org" />
<condition property="signdelimiter" value="">
<equals arg1="${hudson}" arg2="true" />
</condition>
<property name="signdelimiter" value=":" />
<condition property="signquote" value="">
<equals arg1="${hudson}" arg2="true" />
</condition>
<property name="signquote" value="&quot;" />
<condition property="signpoll" value="ls">
<equals arg1="${hudson}" arg2="true" />
</condition>
<property name="signpoll" value="ssh" />
<exec dir="${packtmp}" executable="${signcopy}" output="signing.txt">
<arg line="${archiveName} ${signUser}${signhost}${signdelimiter}${stagingDirectory}" />
</exec>
<exec dir="${buildDirectory}" executable="${signexec}" output="signing.txt" append="true">
<arg line=" ${signUser}${signhost} /bin/chmod ugo+rw ${stagingDirectory}/${archiveName}" />
</exec>
<!--invoke sign script and wait-->
<echo message="invoke sign script and wait" />
<exec dir="." executable="${signexec}" output="signing.txt" append="true">
<arg line=" ${signUser}${signhost} ${signquote}/usr/local/bin/sign ${stagingDirectory}/${archiveName} nomail ${stagingDirectoryOutput}${signquote}" />
</exec>
<!--Wait for build to be available -->
<condition property="signpollline" value="${stagingDirectoryOutput}/${archiveName}">
<equals arg1="${hudson}" arg2="true" />
</condition>
<property name="signpollline" value="${signhost} ${signquote}cd ${stagingDirectoryOutput};ls ${archiveName}${signquote}" />
<antcall target="waitForChangedAttribs">
<param name="signpoll" value="${signpoll}" />
<param name="signpollline" value="${signpollline}" />
</antcall>
<!--copy zip back to build machine -->
<sleep minutes="2" />
<echo message="copy zip back to build machine" />
<exec dir="." executable="${signcopy}" output="signing.txt" append="true">
<arg line=" ${signUser}${signhost}${signdelimiter}${stagingDirectory}/${buildId}-out/${archiveName} ${buildDirectory}/${buildLabel}" />
</exec>
<antcall target="deletetempsigningfiles" />
</target>
<target name="deletetempsigningfiles" unless="hudson">
<echo message="delete temp files on build.eclipse.org" />
<property name="signdeleteline" value="${signUser}${signhost} ${signquote}/bin/rm -rf ${stagingDirectory}/${buildId}-out ${stagingDirectory}/${archiveName}${signquote}" />
<exec dir="." executable="${signexec}" output="signing.txt" append="true">
<arg line="${signdeleteline}" />
</exec>
</target>
<target name="waitForChangedAttribs" unless="attribs.changed">
<antcall target="compareAttribs" inheritAll="false">
<param name="originalAttribs" value="${originalAttribs}" />
<param name="signpoll" value="${signpoll}" />
</antcall>
</target>
<target name="compareAttribs">
<!--poll file for change in attributes-->
<exec dir="${buildDirectory}" executable="${signpoll}" outputProperty="polledAttribs">
<arg line="${signpollline}" />
</exec>
<echo message="original: ${originalAttribs}" />
<condition property="attribChanged">
<and>
<not>
<contains string="${polledAttribs}" substring="Permission denied, please try again." casesensitive="no" />
</not>
<not>
<contains string="${polledAttribs}" substring="Host key verification failed." casesensitive="no" />
</not>
<not>
<contains string="${polledAttribs}" substring="Connection closed by UNKNOWN" casesensitive="no" />
</not>
<or>
<not>
<contains string="${polledAttribs}" substring="No such file or directory" casesensitive="no" />
</not>
<contains string="${polledAttribs}" substring="bash: line 0: cd:" casesensitive="no" />
</or>
</and>
</condition>
<echo message="polled: ${polledAttribs}" />
<antcall target="writeDiffResult" />
<sleep seconds="120" />
<available property="attribs.changed" file="${buildDirectory}/attribDiff.txt" />
<antcall target="waitForChangedAttribs" />
</target>
<target name="writeDiffResult" if="attribChanged">
<echo message="original: ${originalAttribs}" file="${buildDirectory}/attribDiff.txt" />
<echo message="new: ${polledAttribs}" file="${buildDirectory}/attribDiff.txt" append="true" />
</target>
<target name="updatePackProperties">
<!--exclude pre-built Orbit bundles from being signed and packed-->
<property name="packproperties" value="${buildDirectory}/updatePackProperties.txt" />
<generateExcludeList mapFile="${buildDirectory}/maps/e4/releng/org.eclipse.e4.ui.releng/maps/orbit.map" outputFile="${packproperties}" />
<loadfile property="pack.properties" srcFile="${packproperties}" />
<delete file="${packproperties}" failonerror="false" />
<replace file="${builder}/pack.properties" token="@excludejars@" value="${pack.properties}" />
<property name="archiveName" value="eclipse-master-${buildId}.zip" />
<!-- add pack.properties file that specifies effort level -->
<exec dir="${builder}" executable="zip">
<arg line="-r ${buildDirectory}/${buildLabel}/${archiveName} pack.properties" />
</exec>
</target>
</project>