o Cleaned up a bit. Made the diagram prettier, and cleaned up the footnotes.

git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@163075 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
John Dennis Casey 2004-09-13 23:49:49 +00:00
parent 948fedd99f
commit 63c6bcdcc0

View File

@ -6,114 +6,116 @@
Maven Lifecycle
*Lifecycle Permutations
* Single goal
- session lifecycle+
- session lifecycle[1]
- dep resolution (if POM present)
- dep download++
- dep download[2]
- each downloaded dep is registered in MavenSession to track
snapshot downloads
- goal lifecycle
- goal resolution (we assume here only one goal is resolved) +++
- goal resolution (we assume here only one goal is resolved)[3]
- download plugin for goal if necessary++
- download plugin for goal if necessary[2]
- goal execution
+-----+
+------------> goalX
| |
| |
| is the plugin for
| goalX present?
| |
| |
| yes ---+--- no
| | |
| | v
| | download the plugin which
| | contains code for this goal
| | |
| | |
| | v
| | process the plugin descriptor
| | and cache the results
| | |
| | |
| |<---------+
| |
| |
| |
| v
| does goalX have any preGoals?
| |
| yes ---+----- no
| | |
| v |
/-------------/ | foreach(pregoal) |
each pregoal is | (1)| (2)| |
a goal which +----+ | |
may be in | +------->|
another plugin | |
/-------------/ | |
| v
| does goalX have any prereqs?
| |
| yes ---+----- no
| | |
| v |
/------------/ | foreach(prereq) |
each prereq is | (1)| (2)| |
a goal which | | | |
may be in | | |<-------+
another plugin | | |
/------------/ | | |
+------------+ |
| |
| v
| does goalX have any postGoals?
| |
| yes ---+------ no
| | |
| v |
/------------/ | foreach(postgoal) |
each postgoal | (1)| (2)| |
is a goal which +-----------+ | |
may be in +-------->|
another plugin |
/------------/ |
v
+------------> goalX
| |
| |
| is the plugin for
| goalX present?
| |
| |
| yes ---+--- no
| | |
| | v
| | download the plugin which
| | contains code for this goal
| | |
| | |
| | v
| | process the plugin descriptor
| | and cache the results
| | |
| | |
| |<---------+
| |
| |
| |
| v
| does goalX have any preGoals?
| |
| yes ---+----- no
| | |
| v |
/----------------/ | foreach(pregoal) |
|each pregoal is | | (1)| (2)| |
|a goal which | +----+ | |
|may be in | | +------->|
|another plugin | | |
/----------------/ | |
| v
| does goalX have any prereqs?
| |
| yes ---+----- no
| | |
| v |
/---------------/ | foreach(prereq) |
|each prereq is | | (1)| (2)| |
|a goal which | | | | |
|may be in | | | |<-------+
|another plugin | | | |
/---------------/ | | |
+------------+ |
| |
| v
| does goalX have any postGoals?
| |
| yes ---+------ no
| | |
| v |
/---------------/ | foreach(postgoal) |
|each postgoal | | (1)| (2)| |
|is a goal which| +-----------+ | |
|may be in | +-------->|
|another plugin | |
/---------------/ |
v
/-----------------------------------------------------------------------------/
The general form for goal resolution is:
[ main-preGoal* ] [ prereq ]* main-goal [ main-postGoal* ]
where each goal (whether it be preGoal, prereq, goal, or postGoal) is subject
to the same recursive resolution process.
| The general form for goal resolution is: |
| |
| [ main-preGoal* ] [ prereq ]* main-goal [ main-postGoal* ] |
| |
| where each goal (whether it be preGoal, prereq, goal, or postGoal) is |
| subject to the same recursive resolution process. |
/-----------------------------------------------------------------------------/
+-----+
* Multiple goals
- session lifecycle+
- session lifecycle[1]
- dep resolution (if POM present)
- dep download++
- dep download[2]
- goal lifecycle (assume that multiple goals are supplied by user)
- goal resolution (assume multiple goals)
- download plugin for goal(s) as necessary++
- download plugin for goal(s) as necessary[2]
- goal execution
@ -124,7 +126,7 @@ to the same recursive resolution process.
* Reactor with multiple goals
Use Cases
*Use Cases
* where one goal needs to use and modify another goal
eg jcoverage:report does jcoverage:instrument [compiler:compile],
@ -142,21 +144,21 @@ to the same recursive resolution process.
should ensure that only explicit multi-calls execute multiple
times.
Notes
*Notes
* +POM reading: we always attempt to read the POM but it may not be
present because some goals don't require the presence of a POM like
stub generation, project setup or whatever. So we can flag this state
and throw an exception down the line if a goal in fact requires a
project, or if there is a POM when there shouldn't be one.
[[1]] POM reading: we always attempt to read the POM but it may not be
present because some goals don't require the presence of a POM like
stub generation, project setup or whatever. So we can flag this state
and throw an exception down the line if a goal in fact requires a
project, or if there is a POM when there shouldn't be one.
* ++Artifact downloading: all artifacts downloaded during session
execution should be registered in a session-scope collection of id's
to avoid multiple download of -SNAPSHOT and other artifacts.
[[2]] Artifact downloading: all artifacts downloaded during session
execution should be registered in a session-scope collection of id's
to avoid multiple download of -SNAPSHOT and other artifacts.
* +++Goal Resolution: Involves resolving all implied goals (via prereqs,
pre- and post-goal decorations, and resolving/downloading any associated
plugins. Plugin download must be a utility used by this, to ensure that
any goals - specified or resolved - have their associated plugins
downloaded.
[[3]] Goal Resolution: Involves resolving all implied goals (via prereqs,
pre- and post-goal decorations, and resolving/downloading any associated
plugins. Plugin download must be a utility used by this, to ensure that
any goals - specified or resolved - have their associated plugins
downloaded.