maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rfscho...@apache.org
Subject svn commit: r1412319 - /maven/plugins/trunk/maven-invoker-plugin/src/main/java/org/apache/maven/plugin/invoker/AbstractInvokerMojo.java
Date Wed, 21 Nov 2012 21:50:24 GMT
Author: rfscholte
Date: Wed Nov 21 21:50:23 2012
New Revision: 1412319

URL: http://svn.apache.org/viewvc?rev=1412319&view=rev
Log:
[MINVOKER-146] Support modifying Maven executable 

Modified:
    maven/plugins/trunk/maven-invoker-plugin/src/main/java/org/apache/maven/plugin/invoker/AbstractInvokerMojo.java

Modified: maven/plugins/trunk/maven-invoker-plugin/src/main/java/org/apache/maven/plugin/invoker/AbstractInvokerMojo.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-invoker-plugin/src/main/java/org/apache/maven/plugin/invoker/AbstractInvokerMojo.java?rev=1412319&r1=1412318&r2=1412319&view=diff
==============================================================================
--- maven/plugins/trunk/maven-invoker-plugin/src/main/java/org/apache/maven/plugin/invoker/AbstractInvokerMojo.java
(original)
+++ maven/plugins/trunk/maven-invoker-plugin/src/main/java/org/apache/maven/plugin/invoker/AbstractInvokerMojo.java
Wed Nov 21 21:50:23 2012
@@ -423,6 +423,15 @@ public abstract class AbstractInvokerMoj
     private File mavenHome;
 
     /**
+     * mavenExecutable can either be a file relative to <code>${maven.home}/bin/</code>
or an absolute file.
+     * 
+     * @since 1.8
+     * @see Invoker#setMavenExecutable(File)
+     */
+    @Parameter( property = "invoker.mavenExecutable" )
+    private String mavenExecutable;
+    
+    /**
      * The <code>JAVA_HOME</code> environment variable to use for forked Maven
invocations. Defaults to the current Java
      * home directory.
      *
@@ -1605,6 +1614,11 @@ public abstract class AbstractInvokerMoj
                 invoker.setMavenHome( mavenHome );
                 request.addShellEnvironment( "M2_HOME", mavenHome.getAbsolutePath() );
             }
+            
+            if ( mavenExecutable != null )
+            {
+                invoker.setMavenExecutable( new File( mavenExecutable ) );
+            }
 
             if ( javaHome != null )
             {



Mime
View raw message