[ http://jira.codehaus.org/browse/MNG-2140?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_91242 ]
Guillaume Duchesneau commented on MNG-2140: ------------------------------------------- I am using the Cobertura plugin and as Walco said in its comment, it is not very convenient to install all modules prior to launching the tests for code coverage... To understand what was going on behind the scene in Maven, I wrote two simple test mojos : one that forks the lifecycle and one that does not. I found out that the field projectReferences in the class org.apache.maven.project.MavenProject is not set when forking the lifecycle causing the artifact resolution to fail for project in the reactor not yet installed. I (maybe naively) think that the problem is simply due to the fact that the copy constructor in MavenProject does not copy that field. I used Maven 2.0.4 sources to step in the code. I hope this can help... > Mojo in forked lifecycle invoked in reactor build cannot find reactor > dependency > -------------------------------------------------------------------------------- > > Key: MNG-2140 > URL: http://jira.codehaus.org/browse/MNG-2140 > Project: Maven 2 > Issue Type: Bug > Components: Reactor and workspace > Affects Versions: 2.0.2 > Reporter: Grzegorz Slowikowski > Fix For: 2.1.x > > Attachments: test.zip > > > In multiproject I have two modules. One of them (lets name it "main") depends > on the second one ("util"). > If I bind forking lifecycle mojo in the "main" artifact pom, that mojo does > not find "util" artifact and tries to find it in local and remote > repositories. > If the same mojo does not for lifecycle, reactor build finishes with success. > I attach an example: > - plugin with two mojos writing something to the log, one of them forks > lifecycle, second - does not > - test multiproject using test mojo > There are some plugins forking lifecycles, so I think this can be serious > problem. > I would love to see its priority to "Blocker" for Maven 2.0.3 -- 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