You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by jd...@apache.org on 2008/11/25 00:38:04 UTC
svn commit: r720352 - /maven/components/branches/maven-2.1.x/build.xml
Author: jdcasey
Date: Mon Nov 24 15:38:03 2008
New Revision: 720352
URL: http://svn.apache.org/viewvc?rev=720352&view=rev
Log:
Still tuning temp maven home for CI use.
Modified:
maven/components/branches/maven-2.1.x/build.xml
Modified: maven/components/branches/maven-2.1.x/build.xml
URL: http://svn.apache.org/viewvc/maven/components/branches/maven-2.1.x/build.xml?rev=720352&r1=720351&r2=720352&view=diff
==============================================================================
--- maven/components/branches/maven-2.1.x/build.xml (original)
+++ maven/components/branches/maven-2.1.x/build.xml Mon Nov 24 15:38:03 2008
@@ -43,15 +43,23 @@
<typedef resource="org/apache/maven/artifact/ant/antlib.xml" uri="urn:maven-artifact-ant" classpathref="maven-ant-tasks.classpath"/>
</target>
- <target name="isMavenHomeSet" depends="initTaskDefs">
+ <target name="isMavenHomeSet">
<property environment="env"/>
<condition property="maven.home" value="${env.M2_HOME}">
<isset property="env.M2_HOME"/>
</condition>
<fail unless="maven.home" message="You must set the M2_HOME environment variable or specify a maven.home property to this Ant script"/>
</target>
+
+ <target name="pre-init" depends="initTaskDefs">
+ <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"/>
+ <delete file="${basedir}/dependencies.xml"/>
+ </target>
- <target name="init" depends="isMavenHomeSet">
+ <target name="init" depends="pre-init, isMavenHomeSet">
<xmlproperty prefix="pom" file="pom.xml"/>
<basename file="${maven.home}" property="maven.home.basename"/>
<dirname file="${maven.home}" property="maven.home.dirname"/>
@@ -71,15 +79,10 @@
<target name="pull" depends="init" unless="skip.pull">
<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}" 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}">
@@ -249,8 +252,8 @@
<target name="with-its" depends="all,run-its"/>
- <target name="with-temp-maven-home">
- <property name="maven.home" value="${java.io.tmpdir}/maven"/>
+ <target name="set-temp-maven-home" depends="pre-init">
+ <property name="maven.home" value="${java.io.tmpdir}/apache-maven-${pom.version}"/>
<echo>Using temporary maven install directory: ${maven.home}</echo>
</target>