You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by jv...@apache.org on 2008/08/11 22:46:51 UTC
svn commit: r684912 - /maven/components/branches/maven-2.0.10-RC/build.xml
Author: jvanzyl
Date: Mon Aug 11 13:46:50 2008
New Revision: 684912
URL: http://svn.apache.org/viewvc?rev=684912&view=rev
Log:
update to match trunk so we can do a bootstrap
Modified:
maven/components/branches/maven-2.0.10-RC/build.xml
Modified: maven/components/branches/maven-2.0.10-RC/build.xml
URL: http://svn.apache.org/viewvc/maven/components/branches/maven-2.0.10-RC/build.xml?rev=684912&r1=684911&r2=684912&view=diff
==============================================================================
--- maven/components/branches/maven-2.0.10-RC/build.xml (original)
+++ maven/components/branches/maven-2.0.10-RC/build.xml Mon Aug 11 13:46:50 2008
@@ -17,6 +17,22 @@
under the License.
-->
+<!--
+
+By default the bootstrap will use ~/.m2/repository as the integration repository but you can define the integration repository by
+specifying a property on the command line:
+
+ant -Dmaven.repo.local=/my/integration/repository
+
+Those familiar with Maven will note this is the same way the local repository can be set from the command-line. This facilitates
+having a set of builds converge on the same repository for integration purposes.
+
+TODO:
+- Ant Tasks for Modello (generally useful and will greatly shorten the script)
+- Ant Tasks for Plexus Component Descriptors (generally useful and will allow us to eliminate the hand-coded descriptors)
+
+-->
+
<project default="all" basedir="." xmlns:artifact="urn:maven-artifact-ant">
<target name="initTaskDefs">
@@ -37,7 +53,12 @@
<xmlproperty prefix="pom" file="pom.xml"/>
<basename file="${maven.home}" property="maven.home.basename"/>
<dirname file="${maven.home}" property="maven.home.dirname"/>
+ <!-- Initialize properties -->
<property name="maven.home.basename.expected" value="apache-maven-${pom.project.version}"/>
+ <property name="maven.assembly" location="maven-distribution/target/${maven.home.basename.expected}-bin.zip"/>
+ <property name="maven.repo.local" value="${user.home}/.m2/repository"/>
+ <property name="surefire.useFile" value="true"/>
+ <echo>maven.home = ${maven.home}</echo>
</target>
<target name="clean-bootstrap" description="cleans up generated bootstrap classes">
@@ -45,26 +66,21 @@
</target>
<target name="pull" depends="init" unless="skip.pull">
- <property name="verbose" value="false"/>
- <property name="bootstrap.repository" value="${basedir}/bootstrap-repository"/>
+ <property name="verbose" value="false"/>
<!-- Pull the dependencies that Maven needs to build -->
<copy file="pom.xml" tofile="dependencies.xml"/>
<replace file="${basedir}/dependencies.xml" token="<!--start-->" value="<!--"/>
<replace file="${basedir}/dependencies.xml" token="<!--end-->" value="-->"/>
<artifact:pom file="${basedir}/dependencies.xml" id="pom"/>
- <artifact:dependencies pathId="pom.pathid" filesetId="pom.fileset" verbose="${verbose}">
- <!--
- <localRepository path="${bootstrap.repository}"/>
- -->
+ <artifact:dependencies pathId="pom.pathid" filesetId="pom.fileset" verbose="${verbose}" useScope="compile">
+ <localRepository path="${maven.repo.local}"/>
<pom refid="pom"/>
</artifact:dependencies>
<delete file="${basedir}/dependencies.xml"/>
<!-- Pull the dependencies for Modello -->
<artifact:dependencies pathId="modello.pathid" filesetId="modello.fileset" verbose="${verbose}">
- <!--
- <localRepository path="${bootstrap.repository}"/>
- -->
+ <localRepository path="${maven.repo.local}"/>
<dependency groupId="org.codehaus.modello" artifactId="modello-maven-plugin" version="1.0-alpha-17"/>
</artifact:dependencies>
</target>
@@ -100,7 +116,6 @@
</sequential>
</macrodef>
-
<modello file="maven-model/src/main/mdo/maven.mdo" version="4.0.0"/>
<modello file="maven-plugin-descriptor/src/main/mdo/lifecycle.mdo"/>
<modello file="maven-plugin-registry/plugin-registry.mdo"/>
@@ -109,6 +124,7 @@
<modello file="maven-settings/src/main/mdo/settings.mdo"/>
<modello file="maven-repository-metadata/src/main/mdo/metadata.mdo"/>
<modello file="maven-toolchain/src/main/mdo/toolchains.xml"/>
+
</target>
<target name="compile-boot" depends="generate-sources" description="compiles the bootstrap sources">
@@ -143,18 +159,18 @@
<java fork="true" classname="org.apache.maven.cli.MavenCli" failonerror="true">
<classpath refid="maven.classpath"/>
<arg value="-B"/>
- <arg value="-e"/>
<arg value="clean"/>
<arg value="install"/>
+ <arg value="-Dmaven.repo.local=${maven.repo.local}"/>
+ <arg value="-Dsurefire.useFile=${surefire.useFile}"/>
</java>
</target>
- <target name="maven-assembly" depends="maven-compile" description="generates the Maven installation assembly using the bootstrap Maven">
+ <target name="maven-assembly" depends="maven-compile" description="generates the Maven installation assembly using the bootstrap Maven">
<echo>
The new Maven distribution was created as part of the MAVEN-COMPILE step, above.
This goal just validates the presence of that distribution.
</echo>
- <property name="maven.assembly" location="apache-maven/target/${maven.home.basename.expected}-bin.zip"/>
<condition property="build.failed">
<not>
<available file="${maven.assembly}"/>
@@ -165,22 +181,13 @@
<target name="extract-assembly" depends="init,maven-assembly" description="extracts the maven assembly into maven.home">
<echo>Extracting assembly to ${maven.home.dirname} ...</echo>
- <!-- Deleting the contents inside maven.home allow one to use symlinks for maven.home and still have this work. -->
+ <!-- If we are starting from scratch make sure the directory is created -->
+ <delete dir="${maven.home}"/>
<mkdir dir="${maven.home}"/>
- <delete>
- <fileset dir="${maven.home}">
- <include name="bin"/>
- <include name="boot"/>
- <include name="conf"/>
- <include name="lib"/>
- <include name="*.txt"/>
- </fileset>
- </delete>
<unzip src="${maven.assembly}" dest="${maven.home.dirname}"/>
<chmod perm="+x">
<fileset dir="${maven.home}/bin">
<include name="mvn"/>
- <include name="m2"/>
</fileset>
</chmod>
</target>