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/07/22 19:29:55 UTC
svn commit: r678818 - /maven/sandbox/branches/SI_MAVEN_2_1/build.xml
Author: jvanzyl
Date: Tue Jul 22 10:29:54 2008
New Revision: 678818
URL: http://svn.apache.org/viewvc?rev=678818&view=rev
Log:
o merging build.xml from trunk
Modified:
maven/sandbox/branches/SI_MAVEN_2_1/build.xml
Modified: maven/sandbox/branches/SI_MAVEN_2_1/build.xml
URL: http://svn.apache.org/viewvc/maven/sandbox/branches/SI_MAVEN_2_1/build.xml?rev=678818&r1=678817&r2=678818&view=diff
==============================================================================
--- maven/sandbox/branches/SI_MAVEN_2_1/build.xml (original)
+++ maven/sandbox/branches/SI_MAVEN_2_1/build.xml Tue Jul 22 10:29:54 2008
@@ -27,6 +27,10 @@
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">
@@ -49,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">
@@ -57,17 +66,13 @@
</target>
<target name="pull" depends="init" unless="skip.pull">
- <property name="verbose" value="false"/>
-
- <!-- Initialize properties -->
- <property name="maven.repo.local" value="${user.home}/.m2/repository"/>
- <property name="surefire.useFile" value="true"/>
+ <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}">
+ <artifact:dependencies pathId="pom.pathid" filesetId="pom.fileset" verbose="${verbose}" useScope="compile">
<localRepository path="${maven.repo.local}"/>
<pom refid="pom"/>
</artifact:dependencies>
@@ -158,12 +163,11 @@
</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="maven-distribution/target/${maven.home.basename.expected}-bin.zip"/>
<condition property="build.failed">
<not>
<available file="${maven.assembly}"/>
@@ -174,16 +178,9 @@
<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. -->
- <delete>
- <fileset dir="${maven.home}">
- <include name="bin"/>
- <include name="boot"/>
- <include name="conf"/>
- <include name="lib"/>
- <include name="*.txt"/>
- </fileset>
- </delete>
+ <!-- If we are starting from scratch make sure the directory is created -->
+ <delete dir="${maven.home}"/>
+ <mkdir dir="${maven.home}"/>
<unzip src="${maven.assembly}" dest="${maven.home.dirname}"/>
<chmod perm="+x">
<fileset dir="${maven.home}/bin">