maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r755740 - /maven/release/trunk/maven-release-manager/src/main/java/org/apache/maven/shared/release/exec/ForkedMavenExecutor.java
Date Wed, 18 Mar 2009 21:30:52 GMT
Author: olamy
Date: Wed Mar 18 21:30:51 2009
New Revision: 755740

URL: http://svn.apache.org/viewvc?rev=755740&view=rev
Log:
[MRELEASE-428] ForkedMavenExecutor must use ${maven.home}/bin/mvn and not only mvn


Modified:
    maven/release/trunk/maven-release-manager/src/main/java/org/apache/maven/shared/release/exec/ForkedMavenExecutor.java

Modified: maven/release/trunk/maven-release-manager/src/main/java/org/apache/maven/shared/release/exec/ForkedMavenExecutor.java
URL: http://svn.apache.org/viewvc/maven/release/trunk/maven-release-manager/src/main/java/org/apache/maven/shared/release/exec/ForkedMavenExecutor.java?rev=755740&r1=755739&r2=755740&view=diff
==============================================================================
--- maven/release/trunk/maven-release-manager/src/main/java/org/apache/maven/shared/release/exec/ForkedMavenExecutor.java
(original)
+++ maven/release/trunk/maven-release-manager/src/main/java/org/apache/maven/shared/release/exec/ForkedMavenExecutor.java
Wed Mar 18 21:30:51 2009
@@ -58,7 +58,19 @@
                               ReleaseResult relResult )
         throws MavenExecutorException
     {
-        Commandline cl = commandLineFactory.createCommandLine( "mvn" );
+        String mavenPath = null;
+        // if null we use the current one
+        if ( releaseEnvironment.getMavenHome() != null )
+        {
+            mavenPath = releaseEnvironment.getMavenHome().getAbsolutePath();
+        }
+        else
+        {
+            mavenPath = System.getProperty( "maven.home" );
+        }
+       
+        Commandline cl = commandLineFactory.createCommandLine( mavenPath + File.separator
+ "bin" + File.separator
+            + "mvn" );
 
         cl.setWorkingDirectory( workingDirectory.getAbsolutePath() );
 



Mime
View raw message