From b6cc908615c9826cadf0a148ea865218df3e3a8e Mon Sep 17 00:00:00 2001 From: Jason van Zyl Date: Thu, 21 May 2009 16:56:35 +0000 Subject: [PATCH] o notes on dealing with CLI invocations git-svn-id: https://svn.apache.org/repos/asf/maven/components/branches/MNG-2766@777173 13f79535-47bb-0310-9956-ffa450edef68 --- .../lifecycle/DefaultLifecycleExecutor.java | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/maven-core/src/main/java/org/apache/maven/lifecycle/DefaultLifecycleExecutor.java b/maven-core/src/main/java/org/apache/maven/lifecycle/DefaultLifecycleExecutor.java index f532cf85bc..46646c84d4 100644 --- a/maven-core/src/main/java/org/apache/maven/lifecycle/DefaultLifecycleExecutor.java +++ b/maven-core/src/main/java/org/apache/maven/lifecycle/DefaultLifecycleExecutor.java @@ -236,6 +236,33 @@ public class DefaultLifecycleExecutor if ( task.indexOf( ":" ) > 0 ) { + // If this is a goal like "mvn modello:java" and the POM looks like the following: + + // + // 4.0.0 + // org.apache.maven.plugins + // project-plugin-level-configuration-only + // 1.0.1 + // + // + // + // org.codehaus.modello + // modello-maven-plugin + // 1.0.1 + // + // 1.1.0 + // + // src/main/mdo/remote-resources.mdo + // + // + // + // + // + // + // + // We want to take the plugin/configuration and attach it to the MojoExecution we are creating. We are also + // going to give the MojoExecution an id of default-. + MojoDescriptor mojoDescriptor = getMojoDescriptor( task, session ); MojoExecution mojoExecution = new MojoExecution( mojoDescriptor, "default-" + mojoDescriptor.getGoal() );