maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bentm...@apache.org
Subject svn commit: r942430 - /maven/maven-3/trunk/build.xml
Date Sat, 08 May 2010 18:04:28 GMT
Author: bentmann
Date: Sat May  8 18:04:28 2010
New Revision: 942430

URL: http://svn.apache.org/viewvc?rev=942430&view=rev
Log:
o Made bootstrapper fully respect user-supplied maven home directory, including the final
directory name

Modified:
    maven/maven-3/trunk/build.xml

Modified: maven/maven-3/trunk/build.xml
URL: http://svn.apache.org/viewvc/maven/maven-3/trunk/build.xml?rev=942430&r1=942429&r2=942430&view=diff
==============================================================================
--- maven/maven-3/trunk/build.xml (original)
+++ maven/maven-3/trunk/build.xml Sat May  8 18:04:28 2010
@@ -58,17 +58,15 @@ END SNIPPET: ant-bootstrap -->
 
   <target name="init" depends="isMavenHomeSet">
     <xmlproperty prefix="pom" file="pom.xml" />
-    <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.home.effective" location="${maven.home.dirname}/${maven.home.basename.expected}"
/>
     <property name="maven.assembly" location="apache-maven/target/${maven.home.basename.expected}-bin.zip"
/>
     <property name="maven.repo.local" value="${user.home}/.m2/repository" />
     <property name="maven.debug" value="-e" />
     <property name="maven.test.skip" value="false" />
     <property name="surefire.useFile" value="true" />
     <property name="maven.test.redirectTestOutputToFile" value="${surefire.useFile}" />
-    <echo>maven.home = ${maven.home.effective}</echo>
+    <echo>maven.home = ${maven.home}</echo>
     <echo>maven.repo.local = ${maven.repo.local}</echo>
   </target>
 
@@ -232,13 +230,15 @@ This goal just validates the presence of
   </target>
 
   <target name="extract-assembly" depends="init,maven-assembly" description="extracts
the maven assembly into maven.home">
-    <echo>Extracting assembly to ${maven.home.dirname} ...</echo>
+    <echo>Extracting assembly to ${maven.home} ...</echo>
     <!-- If we are starting from scratch make sure the directory is created -->
-    <delete dir="${maven.home.effective}" />
-    <mkdir dir="${maven.home.effective}" />
-    <unzip src="${maven.assembly}" dest="${maven.home.dirname}" />
+    <delete dir="${maven.home}" />
+    <mkdir dir="${maven.home}" />
+    <unzip src="${maven.assembly}" dest="${maven.home}">
+      <mapper type="regexp" from="^[^\\/]+[\\/](.*)$$" to="\1" />
+    </unzip>
     <chmod perm="+x">
-      <fileset dir="${maven.home.effective}/bin">
+      <fileset dir="${maven.home}/bin">
         <include name="mvn" />
       </fileset>
     </chmod>



Mime
View raw message