Maven 2.x Reactor Plugin

Reactor plugin doesn't work with sibling aggregated modules

Details

  • Type: Bug Bug
  • Status: Open Open
  • Priority: Major Major
  • Resolution: Unresolved
  • Affects Version/s: Future
  • Fix Version/s: Future
  • Component/s: None
  • Labels:
    None
  • Number of attachments :
    0

Description

Normally when you have an aggregator POM with a list of <modules>, the element lists out subdirectories of the aggregator, like this:

<modules>
  <module>foo</module>
  <module>bar</module>
</modules>

But modules can be anywhere; the module list can declare relative paths to anywhere, like this:

<modules>
  <module>../foo</module>
  <module>../../bar</module>
</modules>

Since the reactor plugin currently works by using "mvn --reactor", which only accepts subdirectories, it will silently fail to run these sibling modules.

Ultimately we should fix this by using the new command line switches available in 2.1. http://docs.codehaus.org/display/MAVEN/Make+Like+Reactor+Mode In the meantime, we'll have to live with it. (Possibly include a warning? error?)

Issue Links

Activity

Hide
Dan Fabulich added a comment -

Alternately we could construct a temporary POM file with a list of modules in it, execute the POM file and mark it to be deleted on exit...?

Show
Dan Fabulich added a comment - Alternately we could construct a temporary POM file with a list of modules in it, execute the POM file and mark it to be deleted on exit...?
Hide
Dan Fabulich added a comment -

Alternately, we could just try to launch Maven from the highest common directory...? There may or may not be any POM in that location, but it should still work, I think...?

Show
Dan Fabulich added a comment - Alternately, we could just try to launch Maven from the highest common directory...? There may or may not be any POM in that location, but it should still work, I think...?
Hide
Nathan Freeling added a comment -

In some Source Code Repositories (ClearCase UCM), you cannot place a pom.xml at the project root because only ClearCase UCM Components can live at project root. This means that any maven reactor pom must reference sibling modules in a ClearCase UCM enabled VOB with multiple ClearCase components.

Show
Nathan Freeling added a comment - In some Source Code Repositories (ClearCase UCM), you cannot place a pom.xml at the project root because only ClearCase UCM Components can live at project root. This means that any maven reactor pom must reference sibling modules in a ClearCase UCM enabled VOB with multiple ClearCase components.
Hide
Brett Porter added a comment -

Nathan, I suggest you upgrade to a more recent version of Maven and use the built in options.

Show
Brett Porter added a comment - Nathan, I suggest you upgrade to a more recent version of Maven and use the built in options.
Hide
Nathan Freeling added a comment -

Well, I'm stuck with Maven 2.2.1 for now because Maven3 does not properly resolve version variables in transitive dependencies. I know that I'm supposed to use the maven-release-plugin to re-version my POMs but we're still working out the kinks with the ClearCase UCM SCM plugin and these things can take a long time in a large organization. Thanks for the quick response though.

Show
Nathan Freeling added a comment - Well, I'm stuck with Maven 2.2.1 for now because Maven3 does not properly resolve version variables in transitive dependencies. I know that I'm supposed to use the maven-release-plugin to re-version my POMs but we're still working out the kinks with the ClearCase UCM SCM plugin and these things can take a long time in a large organization. Thanks for the quick response though.
Hide
Brett Porter added a comment -

Maven 2.2.1 includes the reactor options I was referring to: -rf, -pl (and the related -am and -amd). These supercede most of the functionality of the reactor plugin.

Show
Brett Porter added a comment - Maven 2.2.1 includes the reactor options I was referring to: -rf, -pl (and the related -am and -amd). These supercede most of the functionality of the reactor plugin.
Hide
Nathan Freeling added a comment -

Using those reactor options runs me right into MNG-4262 which is fixed in a Maven3 release. I'll have to find a workaround until we can move to Maven3.

Show
Nathan Freeling added a comment - Using those reactor options runs me right into MNG-4262 which is fixed in a Maven3 release. I'll have to find a workaround until we can move to Maven3.
Hide
Benjamin Bentmann added a comment -

As mentioned in this issue, the workaround is to specify groupId:artifactId instead of the relative paths to denote the projects.

Show
Benjamin Bentmann added a comment - As mentioned in this issue, the workaround is to specify groupId:artifactId instead of the relative paths to denote the projects.
Hide
Roger Pack added a comment -

Does this also cause any "nested" modules to fail? like if I have a a/b and a/c/d1 and a/c/d2 it will fail [I think I'm getting that currently "roots differ" with 3.0.3]

Show
Roger Pack added a comment - Does this also cause any "nested" modules to fail? like if I have a a/b and a/c/d1 and a/c/d2 it will fail [I think I'm getting that currently "roots differ" with 3.0.3]

People

Vote (4)
Watch (4)

Dates

  • Created:
    Updated: