[
http://jira.codehaus.org/browse/MNGSITE-126?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=251595#action_251595
]
Benjamin Bentmann commented on MNGSITE-126:
-------------------------------------------
Conceptually, inheritance from a parent POM does not induce a dependency on
build output, so there is generally no reason for the reactor order to build
parents before children unless the children have a {{<dependency>}} referring
to the parent. Besides, aggregation of sub module outputs ideally demands the
aggregator project to be built last, regardless whether it's also used as a
parent POM or not.
So be careful to base your build on observation of current sorting implemention
details.
> [Documentation] Reactor sorting
> -------------------------------
>
> Key: MNGSITE-126
> URL: http://jira.codehaus.org/browse/MNGSITE-126
> Project: Maven Project Web Site
> Issue Type: Improvement
> Reporter: Andrey Vorobiev
>
> Guide to Working with Multiple Modules
> (http://maven.apache.org/guides/mini/guide-multiple-modules.html) says:
> >> The following relationships are honoured when sorting projects:
> >> a project dependency on another module in the build
> >> a plugin declaration where the plugin is another modules in the build
> >> a plugin dependency on another module in the build
> >> a build extension declaration on another module in the build
> >> the order declared in the <modules> element (if no other rule applies)
> and what's about parent pom relation?
> For instance we have three modules:
> - parent
> - child-1
> - child-2
> "parent" module is specified as parent pom for modules "child-1" and
> "child-2":
> <parent>
> ...
> <artifactId>parent</artifactId>
> ...
> </parent>
> Also we have aggregator module with contents:
> <project>
> ...
> <modules>
> <module>path to "parent" module</module>
> <module>path to "child-1" module</module>
> <module>path to "child-2" module</module>
> </modules>
> ...
> </project>
> Next we type: mvn clean install
> Can it be guaranteed that "parent" module will be builded and installed into
> local repository before "child-1" and "child-2" modules?
> The same question but in case of multithreaded execution (-T option is
> provided)?
> As far as I understand from source
> "maven-core/src/main/java/org/apache/maven/project/ProjectSorter.java" it can:
> ...
> Parent parent = project.getModel().getParent();
> if ( parent != null )
> {
> // Parent is added as an edge, but must not cause a cycle - so we remove
> any other edges it has
> // in conflict
> addEdge( projectMap, vertexMap, null, projectVertex, parent.getGroupId(),
> parent.getArtifactId(),
> parent.getVersion(), true, false );
> }
> ...
--
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