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 2007/10/03 06:37:51 UTC

svn commit: r581491 - /maven/plugins/trunk/maven-invoker-plugin/src/main/java/org/apache/maven/plugin/invoker/InvokerMojo.java

Author: jdcasey
Date: Tue Oct  2 21:37:49 2007
New Revision: 581491

URL: http://svn.apache.org/viewvc?rev=581491&view=rev
Log:
Adding skip flag to enable fine-grained control over existing plugin configurations from within a profile, simply by setting a flag.

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

Modified: maven/plugins/trunk/maven-invoker-plugin/src/main/java/org/apache/maven/plugin/invoker/InvokerMojo.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-invoker-plugin/src/main/java/org/apache/maven/plugin/invoker/InvokerMojo.java?rev=581491&r1=581490&r2=581491&view=diff
==============================================================================
--- maven/plugins/trunk/maven-invoker-plugin/src/main/java/org/apache/maven/plugin/invoker/InvokerMojo.java (original)
+++ maven/plugins/trunk/maven-invoker-plugin/src/main/java/org/apache/maven/plugin/invoker/InvokerMojo.java Tue Oct  2 21:37:49 2007
@@ -19,9 +19,6 @@
  * under the License.
  */
 
-import bsh.EvalError;
-import bsh.Interpreter;
-
 import org.apache.maven.plugin.AbstractMojo;
 import org.apache.maven.plugin.MojoExecutionException;
 import org.apache.maven.plugin.MojoFailureException;
@@ -51,6 +48,9 @@
 import java.util.Properties;
 import java.util.StringTokenizer;
 
+import bsh.EvalError;
+import bsh.Interpreter;
+
 /**
  * Searches for integration test Maven projects, and executes each, collecting a log in the project directory, and
  * outputting the results to the screen.
@@ -64,6 +64,14 @@
     extends AbstractMojo
 {
     /**
+     * Flag used to suppress certain invocations. This is useful in tailoring the
+     * build using profiles.
+     *
+     * @parameter default-value="false"
+     */
+    private boolean skipInvocation;
+
+    /**
      * Flag used to suppress the summary output notifying of successes and failures. If set to true,
      * the only indication of the build's success or failure will be the effect it has on the main
      * build (if it fails, the main build should fail as well). If streamLogs is enabled, the sub-build
@@ -199,6 +207,12 @@
     public void execute()
         throws MojoExecutionException, MojoFailureException
     {
+        if ( skipInvocation )
+        {
+            getLog().info( "Skipping invocation per configuration. If this is incorrect, ensure the skipInvocation parameter is not set to true." );
+            return;
+        }
+
         String[] includedPoms;
         if ( pom != null )
         {