[
http://jira.codehaus.org/browse/MNG-2863?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
John Casey updated MNG-2863:
----------------------------
Description:
Currently, Maven basically discovers the next step in the build once the last
one is executed, according to profile injection, POM inheritance, lifecycle
mappings, and the default mojos bound to a give lifecycle. The fact that all of
this happens "magically" (completely behind the scenes) makes it quite
difficult to understand how the build will execute ahead of time in some cases.
If a given mojo specifies an @execute annotation, then this can further
confound users trying to understand the build process.
As preparation for adding fine-grained mojo ordering within a phase, as well as
mojo suppression and replacement, we need the ability to see ahead of a build's
execution exactly what steps it will traverse. This should act much like the
effective-pom or effective-settings as a diagnosis tool, and help users target
certain behaviors they want to modify through their POMs.
was:
Currently, Maven basically discovers the next step in the build once the last
one is executed, according to profile injection, POM inheritance, lifecycle
mappings, and the default mojos bound to a give lifecycle. The fact that all of
this happens "magically" (completely behind the scenes) makes it quite
difficult to understand how the build will execute ahead of time in some cases.
If a given mojo specifies an @execute annotation, then this can further
confound users trying to understand the build process.
As preparation for adding fine-grained mojo ordering within a phase, as well as
mojo suppression and replacement, we need the ability to see ahead of a build's
execution exactly what steps it will traverse. This should act much like the
effective-pom or effective-settings as a diagnosis tool, and help users target
certain behaviors they want to modify through their POMs.
Complexity: (was: Expert)
The aforementioned maven branch now contains a refactored lifecycle. If you run
this version of maven with -X, you will see in the output:
Our build plan:
<build-plan elements>
Also, in
http://svn.apache.org/repos/asf/maven/sandbox/trunk/plugins/maven-lifecycle-plugin
you will find a plugin for use with this branch. The plugin accepts a
comma-delimited list of tasks, and outputs the build plan used to execute those
tasks. For instance, inside the maven-lifecycle-plugin itself, if I run:
mvn lifecycle:build-plan -Dtasks=clean,package
I will get the following output:
[INFO] Building Maven Lifecycle Utilities Plugin
[INFO] task-segment: [lifecycle:build-plan]
[INFO]
----------------------------------------------------------------------------
[INFO] [lifecycle:build-plan]
[INFO] Project:
org.apache.maven.plugins:maven-lifecycle-plugin:maven-plugin:1.0-SNAPSHOT
Tasks: clean,package
Build Plan:
org.apache.maven.plugins:maven-clean-plugin:2.1:clean (origin: Maven default
lifecycle)
org.apache.maven.plugins:maven-plugin-plugin:2.2:descriptor (origin: Maven
maven-plugin lifecycle)
org.apache.maven.plugins:maven-resources-plugin:2.2:resources (origin: Maven
maven-plugin lifecycle)
org.apache.maven.plugins:maven-compiler-plugin:2.0.2:compile (origin: Maven
maven-plugin lifecycle)
org.apache.maven.plugins:maven-resources-plugin:2.2:testResources (origin:
Maven maven-plugin lifecycle)
org.apache.maven.plugins:maven-compiler-plugin:2.0.2:testCompile (origin: Maven
maven-plugin lifecycle)
org.apache.maven.plugins:maven-surefire-plugin:2.3.1-SNAPSHOT:test (origin:
Maven maven-plugin lifecycle)
org.apache.maven.plugins:maven-jar-plugin:2.1:jar (origin: Maven maven-plugin
lifecycle)
org.apache.maven.plugins:maven-plugin-plugin:2.2:addPluginArtifactMetadata
(origin: Maven maven-plugin lifecycle)
I'm currently running the core-integration-tests, and then I'll put together
some architectural and plugin doco, and call a vote to merge this back to trunk.
> Refactor lifecycle executor to allow viewing/modification of a declarative
> build 'plan'
> ---------------------------------------------------------------------------------------
>
> Key: MNG-2863
> URL: http://jira.codehaus.org/browse/MNG-2863
> Project: Maven 2
> Issue Type: New Feature
> Components: Plugins and Lifecycle
> Affects Versions: 2.0.5
> Reporter: John Casey
> Assigned To: John Casey
> Fix For: 2.1.x
>
>
> Currently, Maven basically discovers the next step in the build once the last
> one is executed, according to profile injection, POM inheritance, lifecycle
> mappings, and the default mojos bound to a give lifecycle. The fact that all
> of this happens "magically" (completely behind the scenes) makes it quite
> difficult to understand how the build will execute ahead of time in some
> cases. If a given mojo specifies an @execute annotation, then this can
> further confound users trying to understand the build process.
> As preparation for adding fine-grained mojo ordering within a phase, as well
> as mojo suppression and replacement, we need the ability to see ahead of a
> build's execution exactly what steps it will traverse. This should act much
> like the effective-pom or effective-settings as a diagnosis tool, and help
> users target certain behaviors they want to modify through their POMs.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira