Maven 2 & 3

Updating project POM via project.setFile(..) changes project basedir, and project classpath when used as a dependency in a reactor

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 2.0.10
  • Fix Version/s: 2.1.0-M1
  • Component/s: POM, Reactor and workspace
  • Labels:
    None
  • Complexity:
    Intermediate
  • Number of attachments :
    0

Description

When a reactor build contains an interproject dependency, and the dependency project's build switches the project's POM file, the dependent project may get the wrong classpath for the dependency project as long as it references ${basedir}/target/classes.

For example, the shade plugin produces a dependency-reduced POM, and sets it on the project instance using project.setFile(..). This act reorients the project's basedir according to the new POM, which can return the wrong location for the build.outputDirectory (since this is now based on build.directory, which is now based on basedir).

Activity

Hide
John Casey added a comment -

Initially reported steps to reproduce:

svn co https://svn.codehaus.org/picocontainer/java/2.x/trunk/pico
cd pico
mvn install

Show
John Casey added a comment - Initially reported steps to reproduce: svn co https://svn.codehaus.org/picocontainer/java/2.x/trunk/pico cd pico mvn install

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: