maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jdca...@apache.org
Subject svn commit: r720619 - /maven/components/branches/maven-2.0.x/build.xml
Date Tue, 25 Nov 2008 21:54:57 GMT
Author: jdcasey
Date: Tue Nov 25 13:54:57 2008
New Revision: 720619

URL: http://svn.apache.org/viewvc?rev=720619&view=rev
Log:
make sure the maven.repo.local property is set before trying to load the pom.

Modified:
    maven/components/branches/maven-2.0.x/build.xml

Modified: maven/components/branches/maven-2.0.x/build.xml
URL: http://svn.apache.org/viewvc/maven/components/branches/maven-2.0.x/build.xml?rev=720619&r1=720618&r2=720619&view=diff
==============================================================================
--- maven/components/branches/maven-2.0.x/build.xml (original)
+++ maven/components/branches/maven-2.0.x/build.xml Tue Nov 25 13:54:57 2008
@@ -28,6 +28,11 @@
     <property name="taskdefs.inited" value="true"/>
   </target>
 
+  <target name="initLocalRepo">
+    <property name="maven.repo.local" value="${user.home}/.m2/repository"/>
+    <echo>Using the local repository at: ${maven.repo.local}</echo>
+  </target>
+
   <target name="isMavenHomeSet" depends="initTaskDefs">
     <property environment="env"/>
     <condition property="maven.home" value="${env.M2_HOME}">
@@ -36,7 +41,7 @@
     <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="read-pom" depends="initTaskDefs" unless="pom.version">
+  <target name="read-pom" depends="initTaskDefs,initLocalRepo" unless="pom.version">
     <copy file="pom.xml" tofile="dependencies.xml"/>
     <replace file="${basedir}/dependencies.xml" token="&lt;!--start--&gt;" value="&lt;!--"/>
     <replace file="${basedir}/dependencies.xml" token="&lt;!--end--&gt;" value="--&gt;"/>
@@ -44,7 +49,7 @@
     <delete file="${basedir}/dependencies.xml"/>
   </target>
 
-  <target name="init" depends="isMavenHomeSet">
+  <target name="init" depends="isMavenHomeSet,initLocalRepo">
     <xmlproperty prefix="pom" file="pom.xml"/>    
     <basename file="${maven.home}" property="maven.home.basename"/>
     <dirname file="${maven.home}" property="maven.home.dirname"/>



Mime
View raw message