You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Andrey Vorobiev (JIRA)" <ji...@codehaus.org> on 2011/01/14 11:30:57 UTC
[jira] Created: (MNG-4978) [Documentation] Reactor sorting
[Documentation] Reactor sorting
-------------------------------
Key: MNG-4978
URL: http://jira.codehaus.org/browse/MNG-4978
Project: Maven 2 & 3
Issue Type: Bug
Components: Documentation: Guides
Affects Versions: 3.0.1
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
[jira] Moved: (MNGSITE-126) [Documentation] Reactor sorting
Posted by "Benjamin Bentmann (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MNGSITE-126?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Benjamin Bentmann moved MNG-4978 to MNGSITE-126:
------------------------------------------------
Complexity: (was: Intermediate)
Component/s: (was: Documentation: Guides)
Affects Version/s: (was: 3.0.1)
Issue Type: Improvement (was: Bug)
Key: MNGSITE-126 (was: MNG-4978)
Project: Maven Project Web Site (was: Maven 2 & 3)
> [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
[jira] Commented: (MNGSITE-126) [Documentation] Reactor sorting
Posted by "Benjamin Bentmann (JIRA)" <ji...@codehaus.org>.
[ 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
[jira] Commented: (MNGSITE-126) [Documentation] Reactor sorting
Posted by "Andrey Vorobiev (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MNGSITE-126?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=252546#action_252546 ]
Andrey Vorobiev commented on MNGSITE-126:
-----------------------------------------
Ok, thank you for quick reply.
> [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