[ 
http://jira.codehaus.org/browse/MNG-4237?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]
Josh Beitelspacher updated MNG-4237:
------------------------------------

    Attachment: root.zip

This attachment can be used to demonstrate the issue.  It duplicates the setup 
from the issue description.

First, go to the before directory and run "mvn install".

Next, go to the after directory and run "mvn --projects p1/c1,p3,p3/c3 
--also-make-dependents install".

Verify that p3/c2 is built by the second command even though it should not be 
built.

If the deploy target is called this may cause a build error if the user is 
unable to deploy releases.

> 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
>         Attachments: root.zip
>
>
> 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

        

Reply via email to