[ http://jira.codehaus.org/browse/MNG-4237?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=185038#action_185038 ]
Josh Beitelspacher commented on MNG-4237: ----------------------------------------- Using the groupId:artifactId syntax it is actually possible to include the parent project in the reactor build. The fact that a relative path (.) doesn't work while a groupId:artifactId specifier does leads me to believe that this is a bug. > also-make-dependents builds parent projects incorrectly > ------------------------------------------------------- > > Key: MNG-4237 > URL: http://jira.codehaus.org/browse/MNG-4237 > Project: Maven 2 > Issue Type: New Feature > Components: Reactor and workspace > Affects Versions: 2.1.0 > Reporter: Josh Beitelspacher > > I am attempting to use --also-make-dependents to build a minimal set of > changed components in response to source code changes. > Here is a sample project tree: > * root (1.0.0) > ** p1 (1.0.0) > *** c1 (1.0.1-SNAPSHOT) > ** p2 (1.0.1-SNAPSHOT) (depends on c1) > ** p3 (1.0.0) > *** c2 (1.0.0) > A developer adds a new project c3 under p3, modifies p3 to include c3, and > modifies c1 so that it depends on c3. The version numbers of all modified > projects are updated to 1.0.1-SNAPSHOT. The resulting project tree would > appear as follows (with the modified projects in bold): > * root (1.0.0) > ** p1 (1.0.0) > *** *c1* (1.0.1-SNAPSHOT) (depends on c3) > ** p2 (1.0.1-SNAPSHOT) (depends on c1) > ** *p3* (1.0.1-SNAPSHOT) > *** c2 (1.0.0) > *** *c3* (1.0.1-SNAPSHOT) > After the developer checks in these changes, the continuous integration > server detects the changes and runs {{mvn --projects p1/c1,p3,p3/c3 > --also-make-dependents deploy}}. The expected result of the reactor would be: > * p3 is deployed > * c3 is deployed > * c1 is deployed > * p2 is deployed > However when the command is run c2 is also built. c2 is not a dependent on > any of the modified projects and should not be built. I assume it is being > built because its parent is being built, but this should not happen. > If c2 declared p3:1.0.1-SNAPSHOT as its parent it should be rebuilt because a > change in the parent could affect the child. However c2 is a child module of > p3:1.0.0 so a new version of p3 should not affect it. > Also, if the root project is modified another problem emerges. Attempting to > add a period (to reference the current working directory) to the project list > causes the build to fail: > {noformat} > mvn --projects . --also-make-dependents > [INFO] Scanning for projects... > [INFO] > ------------------------------------------------------------------------ > [ERROR] BUILD FAILURE > [INFO] > ------------------------------------------------------------------------ > [INFO] Couldn't find specified project in module list: C:\root\. > [INFO] > ------------------------------------------------------------------------ > [INFO] For more information, run Maven with the -e switch > [INFO] > ------------------------------------------------------------------------ > [INFO] Total time: 1 second > [INFO] Finished at: Fri Jul 10 14:48:00 CDT 2009 > [INFO] Final Memory: 5M/9M > [INFO] > ------------------------------------------------------------------------ > {noformat} -- 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