| <?xml version="1.0"?> |
| <project name="ajdt-build" basedir="." default="run"> |
| |
| <!-- set the properties for os --> |
| <import file="os_support/os.xml" /> |
| |
| <!-- help with provisioning --> |
| <import file="provisioning_support/get-dependencies.xml"/> |
| |
| |
| <taskdef resource="com/ibm/lakeba/ant/taskdefs.properties"> |
| <classpath> |
| <pathelement path="ant_libs/checkresults.jar" /> |
| </classpath> |
| </taskdef> |
| |
| <!-- - - - - - - - - - - - - - - - - - |
| target: init |
| Initializes properties |
| - - - - - - - - - - - - - - - - - --> |
| <target name="init"> |
| <property file="provisioning_support/download.properties" /> |
| <property file="local.properties" /> |
| <property file="build.properties" /> |
| |
| <property file="${build.dist}/ajdt-zip.properties"/> |
| <property environment="env"/> |
| <!-- ===================================================================== --> |
| <!-- Create the timestamp to be used for the build --> |
| <!-- This timestamp will not be used if forceContextQualifier is set from --> |
| <!-- a properties file or from the command line --> |
| <!-- ===================================================================== --> |
| <tstamp> |
| <format property="tstampQual" pattern="yyyyMMdd-HH00" locale="en,US" timezone="America/Vancouver"/> |
| </tstamp> |
| <echo message="tstampQual=${tstampQual}"/> |
| <property name="forceContextQualifier" value="${qualPrefix}-${tstampQual}"/> |
| <property name="buildLabel" value="build-${forceContextQualifier}"/> |
| <property name="signer" location="${builder}/provisioning_support/sign.sh"/> |
| |
| |
| <echo message="=============================================="/> |
| <echo message="forceContextQualifier=${forceContextQualifier}"/> |
| <echo message="=============================================="/> |
| |
| <condition property="target.eclipse.tar" value="${target.eclipse.tar.37}"> |
| <equals arg1="${target.eclipse.version}" arg2="37"/> |
| </condition> |
| <condition property="target.eclipse.tar" value="${target.eclipse.tar.42}"> |
| <equals arg1="${target.eclipse.version}" arg2="42"/> |
| </condition> |
| <condition property="target.eclipse.tar" value="${target.eclipse.tar.43}"> |
| <equals arg1="${target.eclipse.version}" arg2="43"/> |
| </condition> |
| <condition property="target.eclipse.tar" value="${target.eclipse.tar.44}"> |
| <equals arg1="${target.eclipse.version}" arg2="44"/> |
| </condition> |
| <condition property="target.eclipse.tar" value="${target.eclipse.tar.45}"> |
| <equals arg1="${target.eclipse.version}" arg2="45"/> |
| </condition> |
| |
| <echo message="target.eclipse.version=${target.eclipse.version}"/> |
| <echo message="target.eclipse.tar=${target.eclipse.tar}"/> |
| |
| </target> |
| |
| |
| <target name="clean" unless="noclean"> |
| <echo message="clean: Deleting ${build.home}"/> |
| <delete dir="${build.home}" /> |
| <echo message="clean: Deleting ${build.dist}"/> |
| <delete dir="${build.dist}" /> |
| <echo message="clean: Deleting ${build.dest}/target/test_framework"/> |
| <delete dir="${build.dest}/target/test_framework"/> |
| <echo message="clean: Deleting ${target.eclipse}"/> |
| <delete dir="${target.eclipse}" /> |
| </target> |
| |
| <target name="pdebuild" depends="init,init-classpaths,find.pdebuild.home" description="Perform the pde headless build"> |
| <java fork="true" failonerror="true" |
| dir="${pdebuild.home}" |
| classname="org.eclipse.core.launcher.Main"> |
| <arg value="-application" /> |
| <arg value="org.eclipse.ant.core.antRunner" /> |
| <arg value="-data" /> |
| <arg value="${build.dest}/target/build-workspace" /> |
| <arg value="-verbose" /> |
| <arg value="-DfetchCacheLocation=${fetchCacheLocation}" /> |
| <arg value="-Dbuilder=${workdir}/org.eclipse.ajdt.releng" /> |
| <arg value="-DallowBinaryCycles=true"/> |
| <arg value="-DbaseLocation=${target.eclipse}" /> |
| <arg value="-DbuildDirectory=${build.home}" /> |
| <arg value="-Dbuild.dest=${build.dest}" /> |
| <arg value="-DforceContextQualifier=${forceContextQualifier}" /> |
| <classpath> |
| <fileset dir="${build.eclipse}/plugins"> |
| <include name="org.eclipse.equinox.launcher_*.jar"/> |
| </fileset> |
| </classpath> |
| </java> |
| </target> |
| |
| <target name="zip-archive" depends="init" description="Zip up a copy of the archive for local installation"> |
| <property name="zip.name" value="ajdt-${forceContextQualifier}.zip"/> |
| <property name="zip.full.location" value="${build.dist}/${zip.name}"/> |
| |
| <zip destfile="${zip.full.location}"> |
| <fileset dir="${updateSite.loc}" /> |
| </zip> |
| |
| <!-- now store the zip name and location in a property file--> |
| <propertyfile file="${build.dist}/ajdt-zip.properties" comment="This properties file contains the location and name of the AJDT update site archive produced by the latest build"> |
| <entry key="zip.name" value="${zip.name}"/> |
| <entry key="zip.full.location" value="${zip.full.location}"/> |
| </propertyfile> |
| </target> |
| |
| <target name="find.pdebuild.home"> |
| <echo message="build.eclipse=${build.eclipse}"/> |
| <files includes="${build.eclipse}/plugins/org.eclipse.pde.build_*/scripts" id="pdebuild.folder" /> |
| <property name="pdebuild.home" value="${toString:pdebuild.folder}" /> |
| <echo message="pdebuild.home=${pdebuild.home}" /> |
| <echo message="path=${build.eclipse}/plugins/org.eclipse.pde.build_*/scripts" /> |
| <echo message="path=${toString:pdebuild.folder}" /> |
| |
| </target> |
| |
| <target name="generateP2metadata" depends="init,init-classpaths,find.pdebuild.home" description="Generate p2 metadata for the AJDT update site"> |
| <java fork="true" failonerror="true" classpathref="eclipse.classpath" |
| dir="${pdebuild.home}" |
| classname="org.eclipse.core.launcher.Main"> |
| <arg value="-application" /> |
| <arg value="org.eclipse.equinox.p2.publisher.EclipseGenerator" /> |
| <arg value="-updateSite" /> |
| <arg value="${updateSite.loc}" /> |
| <arg value="-base" /> |
| <arg value="${updateSite.loc}" /> |
| <arg value="-site" /> |
| <arg value="file:${updateSite.loc}/site.xml" /> |
| <arg value="-metadataRepository" /> |
| <arg value="file:${updateSite.loc}" /> |
| <arg value="-metadataRepositoryName" /> |
| <arg value="${p2.repository.name}" /> |
| <arg value="-artifactRepository" /> |
| <arg value="file:${updateSite.loc}" /> |
| <arg value="-artifactRepositoryName" /> |
| <arg value="${p2.repository.name}" /> |
| <arg value="-reusePack200Files" /> |
| <arg value="-noDefaultIUs" /> |
| <jvmarg value="-Xmx128M" /> |
| </java> |
| </target> |
| |
| |
| <target name="signUpdateSite" depends="init,init-classpaths,find.pdebuild.home" description="Digitally signs the update site"> |
| |
| <taskdef resource="net/sf/antcontrib/antcontrib.properties" > |
| <classpath> |
| <pathelement path="ant_libs/ant-contrib-1.0b3.jar" /> |
| </classpath> |
| </taskdef> |
| |
| <if> |
| <equals arg1="${p2.sign}" arg2="true" /> |
| |
| <then> |
| <delete file="${updateSite.loc}/content.xml" /> |
| <delete file="${updateSite.loc}/artifacts.xml" /> |
| |
| <java classname="org.eclipse.equinox.internal.p2.jarprocessor.Main" fork="true" |
| classpathref="jarprocessor.classpath" failonerror="true" maxmemory="256m" dir="${updateSite.loc}"> |
| <arg line="-verbose -processAll -repack -pack -sign ${signer}" /> |
| <arg line="-outputDir ${updateSite.loc} ${updateSite.loc}" /> |
| </java> |
| |
| <java classname="org.eclipse.equinox.launcher.Main" fork="true" classpathref="eclipse.classpath" |
| failonerror="true" maxmemory="256m" dir="${updateSite.loc}"> |
| <arg line="-application org.eclipse.equinox.p2.publisher.FeaturesAndBundlesPublisher" /> |
| <arg line="-source ${updateSite.loc} -metadataRepository file:${updateSite.loc}" /> |
| <arg line="-artifactRepository file:${updateSite.loc} -metadataRepositoryName '${p2.repository.name}'" /> |
| <arg line="-artifactRepositoryName '${p2.repository.name}' -reusePackedFiles -reusePack200Files -publishArtifacts" /> |
| </java> |
| |
| <java classname="org.eclipse.equinox.launcher.Main" fork="true" classpathref="eclipse.classpath" |
| failonerror="true" maxmemory="256m" dir="${updateSite.loc}"> |
| <arg line="-application org.eclipse.equinox.p2.publisher.CategoryPublisher" /> |
| <arg line="-metadataRepository file:${updateSite.loc}" /> |
| <arg line="-categoryDefinition file:${updateSite.loc}/site.xml" /> |
| <arg line="-categoryQualifier org.eclipse.ajdt" /> |
| </java> |
| </then> |
| </if> |
| </target> |
| |
| <!-- |
| Run the site optimizer over the update site directory, prior to |
| uploading to the update server - spyoung |
| |
| ADE - this is not working any more, so disable. It seems that |
| some jars are not being properly processed. As this is not a |
| requirement any longer, it is ok to disable. |
| --> |
| <target name="optimizeUpdateSite" depends="init,init-classpaths"> |
| <!-- Step 1 - process all the JARs and mark them for packing --> |
| <java fork="true" failonerror="true" classpathref="eclipse.classpath" |
| classname="org.eclipse.core.launcher.Main"> |
| <arg value="-application" /> |
| <arg value="org.eclipse.update.core.siteOptimizer" /> |
| <arg line="-jarProcessor -processAll -repack -verbose" /> |
| <arg line="-outputDir ${updateSite.loc}" /> |
| <arg value="${updateSite.loc}" /> |
| </java> |
| |
| <!-- Step 2 - "repack" all the JARs (i.e actaully pack them!) --> |
| <java fork="true" failonerror="true" classpathref="eclipse.classpath" |
| classname="org.eclipse.core.launcher.Main"> |
| <arg value="-application" /> |
| <arg value="org.eclipse.update.core.siteOptimizer" /> |
| <arg line="-jarProcessor -pack -verbose" /> |
| <arg line="-outputDir ${updateSite.loc}" /> |
| <arg value="${updateSite.loc}" /> |
| </java> |
| </target> |
| |
| |
| <target name="check.provision.build" description="Check to see if the build eclipse has already been provisioned"> |
| <echo message="build.eclipse=${build.eclipse}"/> |
| <available file="${build.eclipse}/.provisioned" property="provision.build.completed"/> |
| <echo message="provision.build.completed=${provision.build.completed}"/> |
| </target> |
| |
| <!-- for now, only tar files are supported --> |
| <!-- <target name="provision-build-eclipse" depends="init,check.provision.build,download-eclipse" description="Provisions the Eclipse that is driving the build process"> --> |
| <target name="provision-build-eclipse" depends="init,init-classpaths,check.provision.build" unless="provision.build.completed" description="Provisions the Eclipse that is driving the build process"> |
| <!-- set the build eclipse archive if it doesn't already exist --> |
| <!-- the build eclipse is 4.3 based --> |
| |
| <echo message="Provision BUILD eclipse"/> |
| |
| <property name="build.eclipse.tar" value="${download.home}/${target.eclipse.tar.45}"/> |
| <echo message="build.eclipse.tar=${build.eclipse.tar}"/> |
| |
| <!-- Unpack eclipse --> |
| <mkdir dir="${build.dest}"/> |
| <antcall target="unpack-archive"> |
| <param name="theFile" value="${build.eclipse.tar}" /> |
| <param name="theDir" value="${build.dest}" /> |
| </antcall> |
| |
| <!-- Install AJDT --> |
| <install-bundle |
| eclipse.loc="${build.dest}/eclipse" |
| updatesite.url="http://download.eclipse.org/tools/ajdt/45/dev/update" |
| feature.id="org.eclipse.ajdt" /> |
| |
| <!-- Install Fetach factory for git repos --> |
| <install-bundle |
| eclipse.loc="${build.dest}/eclipse" |
| updatesite.url="http://download.eclipse.org/egit/pde/updates-nightly" |
| feature.id="org.eclipse.egit.fetchfactory" /> |
| |
| |
| <!-- Mark as provisioned --> |
| <touch file="${build.dest}/eclipse/.provisioned" /> |
| |
| </target> |
| |
| <target name="init-classpaths"> |
| <!-- paths for use later --> |
| <path id="eclipse.classpath"> |
| <fileset dir="${build.dest}/eclipse/plugins"> |
| <include name="org.eclipse.equinox.launcher_*.jar" /> |
| </fileset> |
| </path> |
| <path id="jarprocessor.classpath"> |
| <fileset dir="${build.dest}/eclipse/plugins"> |
| <include name="org.eclipse.equinox.p2.jarprocessor_*.jar" /> |
| </fileset> |
| </path> |
| |
| </target> |
| |
| <!-- for now, only tar files are supported --> |
| <!-- Sets up the Target eclipse to build against--> |
| <target name="provision-target-eclipse" depends="init,init-classpaths" unless="no.provision.target"> |
| <!-- download if not already there --> |
| <!-- disable downloading |
| <mkdir dir="${download.home}"/> |
| <antcall target="downloadFile"> |
| <param name="theURL" value="${target.url}"/> |
| <param name="downloadsDir" value="${download.home}"/> |
| <param name="theFile" value="${target.eclipse.tar}"/> |
| </antcall> |
| --> |
| <!-- Unpack a fresh eclipse --> |
| <delete failonerror="false"> |
| <fileset dir="${build.dest}/target/eclipse"/> |
| </delete> |
| <mkdir dir="${build.dest}/target"/> |
| <antcall target="unpack-archive"> |
| <param name="theFile" value="${download.home}/${target.eclipse.tar}" /> |
| <param name="theDir" value="${build.dest}/target" /> |
| </antcall> |
| |
| |
| <!-- <property name="mylyn.update.site" location="http://download.eclipse.org/mylyn/releases/indigo"/> --> |
| <property name="mylyn.update.site" value="http://download.eclipse.org/mylyn/releases/latest"/> |
| |
| <echo message="mylyn.update.site = ${mylyn.update.site}"/> |
| |
| <!-- Install Mylyn --> |
| <install-bundle |
| eclipse.loc="${build.dest}/target/eclipse" |
| updatesite.url="${mylyn.update.site}" |
| feature.id="org.eclipse.mylyn_feature" /> |
| <install-bundle |
| eclipse.loc="${build.dest}/target/eclipse" |
| updatesite.url="${mylyn.update.site}" |
| feature.id="org.eclipse.mylyn.context_feature" /> |
| <install-bundle |
| eclipse.loc="${build.dest}/target/eclipse" |
| updatesite.url="${mylyn.update.site}" |
| feature.id="org.eclipse.mylyn.ide_feature" /> |
| <install-bundle |
| eclipse.loc="${build.dest}/target/eclipse" |
| updatesite.url="${mylyn.update.site}" |
| feature.id="org.eclipse.mylyn.java_feature" /> |
| |
| <!-- The osg.jar in 4.4.M7 contains entries that 4.3 builder gets confused by and only 4.4.M7 PDE build handles properly |
| See http://git.eclipse.org/c/pde/eclipse.pde.build.git/diff/org.eclipse.pde.build/src/org/eclipse/pde/internal?id=3ed6008e0d23de975203cd313e3d04ca9f23c69b |
| |
| We avoid the problem by replacing the profiles index file in the osgi jar. |
| Yes, dirty hack. But what else can we do? |
| |
| Once we can build 4.4 with 4.4 |
| |
| <property name="target.osgi.jar" value="${build.dest}/target/eclipse/plugins/org.eclipse.osgi_3.10.0.v20140428-1446.jar"/> |
| <jar destfile="${target.osgi.jar}" update="true"> |
| <fileset dir="${builder}/provisioning_support/osgi-3.10-patching"> |
| <include name="profile.list"/> |
| </fileset> |
| </jar> |
| --> |
| |
| <!-- install more recent jdt because ajdt requires it in target pf. M6 isn't good enough |
| Now that M7 is out this shouldn't be needed anymore. |
| <install-bundle |
| eclipse.loc="${build.dest}/target/eclipse" |
| updatesite.url="http://download.eclipse.org/eclipse/updates/4.4-I-builds" |
| feature.id="org.eclipse.jdt" /> |
| --> |
| </target> |
| |
| |
| <!-- Provisions the target Eclipse so that it can run the tests. Does so by installing all of the test plugins. --> |
| <target name="provision-test-eclipse" depends="init"> |
| <install-bundle |
| eclipse.loc="${build.dest}/target/eclipse" |
| updatesite.url="file:${updateSite.loc}" |
| feature.id="org.eclipse.ajdt" /> |
| <install-bundle |
| eclipse.loc="${build.dest}/target/eclipse" |
| updatesite.url="file:${updateSite.loc}" |
| feature.id="org.eclipse.equinox.weaving.sdk" /> |
| <install-bundle |
| eclipse.loc="${build.dest}/target/eclipse" |
| updatesite.url="file:${updateSite.loc}" |
| feature.id="org.eclipse.aspectj.feature_tests" /> |
| |
| <!-- Ensure that weaving bundle is auto-started, but ensure that we don't add the line twice --> |
| <replace file="${build.dest}/target/eclipse/configuration/config.ini" |
| token="osgi.bundles=org.eclipse.equinox.weaving.aspectj@3\:start," value="osgi.bundles="/> |
| <replace file="${build.dest}/target/eclipse/configuration/config.ini" |
| token="osgi.bundles=" value="osgi.bundles=org.eclipse.equinox.weaving.aspectj@3\:start,"/> |
| |
| <!-- org.eclipse.test needs to be in the target AND the build eclipses --> |
| <delete dir="${build.dest}/target/test_framework"/> |
| <mkdir dir="${build.dest}/target/test_framework"/> |
| <unzip src="${builder}/build_bundles/${eclipse.test.framework.version}" dest="${build.dest}/target/test_framework" /> |
| |
| <!-- |
| <uninstall-bundle |
| eclipse.loc="${build.dest}/target/eclipse" |
| updatesite.url="file:${build.dest}/target/test_framework" |
| feature.id="org.eclipse.test"/> |
| --> |
| |
| <install-bundle-version |
| eclipse.loc="${build.dest}/target/eclipse" |
| updatesite.url="file:${build.dest}/target/test_framework" |
| feature.id="org.eclipse.test" version="${org.eclipse.test.feature.version}"/> |
| |
| <install-bundle-version |
| eclipse.loc="${build.dest}/eclipse" |
| updatesite.url="file:${build.dest}/target/test_framework" |
| feature.id="org.eclipse.test" version="${org.eclipse.test.feature.version}"/> |
| |
| <copy file="${builder}/build_bundles/library.xml" todir="${build.eclipse}/plugins/org.eclipse.test_${org.eclipse.test}/"/> |
| <copy file="${builder}/build_bundles/JUNIT.XSL" todir="${build.eclipse}/plugins/org.eclipse.test_${org.eclipse.test}/"/> |
| |
| |
| <!-- start with a clean workspace --> |
| <delete failonerror="false"> |
| <fileset dir="${test.workspace}" /> |
| </delete> |
| |
| </target> |
| |
| <target name="run-test-eclipse" depends="init,run-weaving-tests,run-core-tests,run-ui-tests"/> |
| |
| <target name="run-weaving-tests" depends="init,refresh-test-workspace"> |
| <antcall target="refresh-test-workspace" /> |
| <ant target="ui-test" antfile="${test.library.xml}" dir="${target.eclipse}" inheritall="false"> |
| <property name="data-dir" value="${test.workspace}" /> |
| <property name="plugin-name" value="org.eclipse.contribution.weaving.jdt.tests" /> |
| <property name="classname" value="org.eclipse.contribution.weaving.jdt.tests.AllWeavingTests" /> |
| <property name="eclipse-home" value="${target.eclipse}" /> |
| <property name="vmargs" value="${vmargs} ${osgi.vmargs}" /> |
| <property name="org.eclipse.test" value="${org.eclipse.test}" /> |
| <property name="arch" value="${build.arch}"/> |
| <property name="os" value="${build.os}"/> |
| <property name="ws" value="${build.ws}"/> |
| <property name="timeout" value="720000"/> |
| </ant> |
| </target> |
| |
| <target name="run-core-tests" depends="init,refresh-test-workspace"> |
| <antcall target="refresh-test-workspace" /> |
| <!-- This should be a core-test, but the tests are hanging on the build server, so maybe they need to be UI tests. --> |
| <ant target="ui-test" antfile="${test.library.xml}" dir="${target.eclipse}" inheritall="false"> |
| <property name="data-dir" value="${test.workspace}" /> |
| <property name="plugin-name" value="org.eclipse.ajdt.core.tests" /> |
| <property name="classname" value="org.eclipse.ajdt.core.tests.AllCoreTests" /> |
| <property name="eclipse-home" value="${target.eclipse}" /> |
| <property name="vmargs" value="${vmargs} ${osgi.vmargs}" /> |
| <property name="org.eclipse.test" value="${org.eclipse.test}" /> |
| <property name="arch" value="${build.arch}"/> |
| <property name="os" value="${build.os}"/> |
| <property name="ws" value="${build.ws}"/> |
| </ant> |
| </target> |
| |
| <target name="run-ui-tests" depends="init,refresh-test-workspace"> |
| <antcall target="refresh-test-workspace" /> |
| <ant target="ui-test" antfile="${test.library.xml}" dir="${target.eclipse}" inheritall="false"> |
| <property name="data-dir" value="${test.workspace}" /> |
| <property name="plugin-name" value="org.eclipse.ajdt.ui.tests" /> |
| <property name="classname" value="org.eclipse.ajdt.ui.tests.AllUITests" /> |
| <property name="eclipse-home" value="${target.eclipse}" /> |
| <property name="vmargs" value="${vmargs} ${osgi.vmargs}" /> |
| <property name="org.eclipse.test" value="${org.eclipse.test}" /> |
| <property name="arch" value="${build.arch}"/> |
| <property name="os" value="${build.os}"/> |
| <property name="ws" value="${build.ws}"/> |
| </ant> |
| </target> |
| |
| |
| <target name="set-test-properties"> |
| <property name="vmargs" value="-Xmx1024M -XX:PermSize=64M -XX:MaxPermSize=256M -XX:-UseSplitVerifier"/> |
| <property name="osgi.vmargs" value="-Daj.weaving.verbose=true -Dorg.aspectj.weaver.showWeaveInfo=true -Dorg.aspectj.osgi.verbose=true -Dosgi.clean=true"/> |
| </target> |
| |
| <!-- |
| FIXADE: |
| |
| Note that we have to run an empty test before we can run the real test. |
| The first run of a ui test case in a clean workspace is failing |
| on the build server. So, we run this empty test first in order to get things |
| going. |
| --> |
| <target name="refresh-test-workspace" depends="init,set-test-properties"> |
| <delete dir="${test.workspace}"/> |
| <ant target="ui-test" antfile="${test.library.xml}" dir="${target.eclipse}" inheritall="false"> |
| <property name="data-dir" value="${test.workspace}" /> |
| <property name="plugin-name" value="org.eclipse.contribution.weaving.jdt.tests" /> |
| <property name="classname" value="org.eclipse.contribution.weaving.jdt.tests.EmptyTest" /> |
| <property name="eclipse-home" value="${target.eclipse}" /> |
| <property name="vmargs" value="${vmargs} ${osgi.vmargs}" /> |
| <property name="org.eclipse.test" value="${org.eclipse.test}" /> |
| <property name="arch" value="${build.arch}"/> |
| <property name="os" value="${build.os}"/> |
| <property name="ws" value="${build.ws}"/> |
| </ant> |
| </target> |
| |
| |
| <target name="copy-test-results" depends="init"> |
| <!-- |
| Copy the xml output files created by the plugin test harness to a |
| temp location from where it can be merged into build log |
| --> |
| <delete dir="${test.results}" failonerror="false" /> |
| <mkdir dir="${test.results}" /> |
| <copy overwrite="true" |
| file="${target.eclipse}/results/org.eclipse.ajdt.ui.tests.AllUITests.xml" todir="${test.results}" /> |
| <copy overwrite="true" |
| file="${target.eclipse}/results/org.eclipse.ajdt.core.tests.AllCoreTests.xml" todir="${test.results}" /> |
| <copy overwrite="true" |
| file="${target.eclipse}/results/org.eclipse.contribution.weaving.jdt.tests.AllWeavingTests.xml" |
| todir="${test.results}" /> |
| <copy overwrite="true" |
| file="${target.eclipse}/results/org.eclipse.ajdt.ui.tests.AllUITests.txt" todir="${test.results}" /> |
| <copy overwrite="true" |
| file="${target.eclipse}/results/org.eclipse.ajdt.core.tests.AllCoreTests.txt" todir="${test.results}" /> |
| <copy overwrite="true" |
| file="${target.eclipse}/results/org.eclipse.contribution.weaving.jdt.tests.AllWeavingTests.txt" |
| todir="${test.results}" /> |
| </target> |
| |
| <target name="check-results"> |
| <!-- Will set property only if failures detected --> |
| <!-- |
| <checkutresults property="ajdt.junit.failed" |
| file="${test.results}/org.eclipse.ajdt.ui.tests.AllUITests.xml" /> |
| <checkutresults property="ajdt.junit.failed" |
| file="${test.results}/org.eclipse.ajdt.core.tests.AllCoreTests.xml" /> |
| <checkutresults property="ajdt.junit.failed" |
| file="${test.results}/org.eclipse.contribution.weaving.jdt.tests.AllWeavingTests.xml" /> |
| --> |
| </target> |
| |
| <target name="check-tests-failed" if="ajdt.junit.failed"> |
| <fail>JUnit plugin tests failed: ${ajdt.junit.failed}</fail> |
| </target> |
| |
| |
| <!-- <target name="build" depends="provision-build-eclipse,provision-target-eclipse,pdebuild,optimizeUpdateSite,generateP2metadata,zip-archive" /> --> |
| <!-- Disable optimizeUpdateSite --> |
| <target name="build" depends="init,provision-build-eclipse,provision-target-eclipse,pdebuild,generateP2metadata,signUpdateSite,zip-archive" /> |
| |
| <target name="tests" depends="init,provision-test-eclipse,run-test-eclipse,copy-test-results,check-results,check-tests-failed" /> |
| |
| <target name="run" depends="init,clean,build,tests,upload-and-unzip" /> |
| <target name="skiptest" depends="init,clean,build" /> |
| |
| <!-- ================================= |
| target: upload-build |
| ================================= --> |
| <target name="upload-build" description="Uploads an AJDT zip archive to the download server"> |
| <scp todir="${env.bamboo_upload_userid}:${env.bamboo_upload_password}@${upload.host}:${upload.dir}" failonerror="true" trust="true" verbose="true"> |
| <fileset dir="${build.dist}"> |
| <include name="${zip.name}" /> |
| </fileset> |
| </scp> |
| </target> |
| |
| <!-- ================================= |
| target: delete-old |
| ================================= --> |
| <target name="delete-old" description="Deletes the old version of the plugin"> |
| <sshexec host="${upload.host}" username="${env.bamboo_upload_userid}" password="${env.bamboo_upload_password}" command="unalias rm ; rm -rf content.* artifacts.* site.* ${upload.dir}/plugins ${upload.dir}/features" failonerror="true" verbose="true" trust="true" /> |
| </target> |
| |
| <!-- ================================= |
| target: unzip-build |
| ================================= --> |
| <target name="unzip-build" description="Unzips build on download server"> |
| <sshexec host="${upload.host}" username="${env.bamboo_upload_userid}" password="${env.bamboo_upload_password}" command="unzip -o ${upload.dir}/${zip.name} -d ${upload.dir}" failonerror="true" trust="true" /> |
| </target> |
| |
| <target name="upload-and-unzip" depends="upload-build,delete-old,unzip-build" |
| description="Uploads, and unzips build on download server"> |
| </target> |
| |
| </project> |