123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132 |
- <project name="run.xml" default="all" basedir=".">
- <taskdef resource="net/sf/antcontrib/antlib.xml" classpath="lib/ant-contrib-1.0b3.jar" />
- <tstamp>
- <format property="buildTimestamp" pattern="yyyyMMddHHmm" />
- </tstamp>
- <property environment="env" />
- <property file="run.properties" />
- <property file="build/build.properties" />
- <target name="prepareBuildDirectory">
- <echo message="Preparing build directory..." />
- <delete dir="${buildDirectory}" />
- <mkdir dir="${buildDirectory}" />
- <antcall target="prepareRepositoriesDirectory" />
- <antcall target="prepareFeatures" />
- <antcall target="preparePlugins" />
- </target>
- <target name="prepareRepositoriesDirectory">
- <!-- base only has to be prepared, if it does not exist or if the user explicitly specifies to do so (skipBase=false) -->
- <echo message="Skipping repositories: ${skipRepositories}" />
- <if>
- <or>
- <equals arg1="${skipRepositories}" arg2="false" />
- <not>
- <available file="${repoBaseLocation}" />
- </not>
- </or>
- <then>
- <trycatch>
- <try>
- <mkdir dir="${repoBaseLocation}" />
- <antcall target="prepareRepositories" />
- </try>
- <catch>
- <echo message="Preparing repositories failed. Cleaning up..." />
- <delete dir="${repoBaseLocation}" />
- <echo message="Done." />
- </catch>
- </trycatch>
- </then>
- </if>
- </target>
- <target name="prepareRepositories">
- <echo message="Preparing repositories ..." />
- <!-- project updates -->
- <p2.mirror source="${downloadMirror}/eclipse/updates/3.7milestones" destination="file:${repoBaseLocation}/eclipse_updates_3_7">
- <iu id="org.eclipse.platform.ide" />
- <slicingOptions includeOptional="false" includeNonGreedy="false" followStrict="true" />
- </p2.mirror>
- <!-- indigo releases -->
- <p2.mirror source="${downloadMirror}/releases/indigo" destination="file:${repoBaseLocation}/releases_indigo">
- <iu id="org.eclipse.emf.sdk.feature.group" />
- <iu id="org.eclipse.gmf.runtime.notation.sdk.feature.group" />
- <iu id="org.eclipse.gmf.runtime.sdk.feature.group" />
- <iu id="org.eclipse.xtext.sdk.feature.group" />
- <!--<slicingOptions includeOptional="false" includeNonGreedy="false" followStrict="true" />-->
- </p2.mirror>
- <echo message="Preparing repositories done." />
- </target>
- <target name="preparePlugins">
- <delete dir="${buildDirectory}/plugins" />
- <mkdir dir="${buildDirectory}/plugins" />
- <!-- Copy plugins -->
- <echo>Copy plugins from ${repository} to ${buildDirectory}/plugins</echo>
- <copy todir="${buildDirectory}/plugins">
- <fileset dir="${buildWorkspace}/sct2_repository/plugins" />
- </copy>
- <copy todir="${buildDirectory}/plugins">
- <fileset dir="${buildWorkspace}/base_repository/plugins" />
- </copy>
- <copy todir="${buildDirectory}/plugins">
- <fileset dir="${buildWorkspace}/gmf_utils_repository/plugins" />
- </copy>
- </target>
- <target name="prepareFeatures">
- <delete dir="${buildDirectory}/features" />
- <mkdir dir="${buildDirectory}/features" />
- <!-- Copy features -->
- <echo>Copy features from ${repository} to ${buildDirectory}/features</echo>
- <copy todir="${buildDirectory}/features">
- <fileset dir="${buildWorkspace}/sct2_repository/features" />
- </copy>
- <copy todir="${buildDirectory}/features">
- <fileset dir="${buildWorkspace}/gmf_utils_repository/features" />
- </copy>
- <!-- remove the "-feature" suffix of all feature projects in the features folder -->
- <for param="currentFeatureDir" keepgoing="true">
- <path>
- <dirset dir="${buildDirectory}/features">
- <include name="*-feature" />
- </dirset>
- </path>
- <sequential>
- <propertyregex override="yes" property="renamedFeatureDir" input="@{currentFeatureDir}" regexp="(.*)-feature" select="\1" />
- <echo message="Moving @{currentFeatureDir} to ${renamedFeatureDir}" />
- <move todir="${renamedFeatureDir}">
- <fileset dir="@{currentFeatureDir}" />
- </move>
- </sequential>
- </for>
- </target>
- <target name="all">
- <echo message="Preparing build directory ${buildDirectory}" />
- <antcall target="prepareBuildDirectory" />
- <echo message="Using buildWorspace ${buildWorkspace}" />
- <echo message="Cleaning up report directory ${reportDirectory}" />
- <delete dir="${reportDirectory}" />
- <mkdir dir="${reportDirectory}" />
- <ant antfile="build.xml" dir="build" target="all" inheritall="true">
- <property name="builder" value="${basedir}/build" />
- <property name="libs" value="${basedir}/lib" />
- </ant>
- </target>
- </project>
|