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() );