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
This commit is contained in:
Jason van Zyl 2009-05-21 16:56:35 +00:00
parent fde34e8384
commit b6cc908615
1 changed files with 27 additions and 0 deletions

View File

@ -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:
// <project>
// <modelVersion>4.0.0</modelVersion>
// <groupId>org.apache.maven.plugins</groupId>
// <artifactId>project-plugin-level-configuration-only</artifactId>
// <version>1.0.1</version>
// <build>
// <plugins>
// <plugin>
// <groupId>org.codehaus.modello</groupId>
// <artifactId>modello-maven-plugin</artifactId>
// <version>1.0.1</version>
// <configuration>
// <version>1.1.0</version>
// <models>
// <model>src/main/mdo/remote-resources.mdo</model>
// </models>
// </configuration>
// </plugin>
// </plugins>
// </build>
// </project>
//
// 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-<goal>.
MojoDescriptor mojoDescriptor = getMojoDescriptor( task, session );
MojoExecution mojoExecution = new MojoExecution( mojoDescriptor, "default-" + mojoDescriptor.getGoal() );