Issue Details (XML | Word | Printable)

Key: MNG-3693
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: John Casey
Reporter: John Casey
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Maven 2 & 3

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

Created: 01/Aug/08 11:35 AM   Updated: 03/Sep/08 04:57 PM   Resolved: 01/Aug/08 02:37 PM
Component/s: POM, Reactor and workspace
Affects Version/s: 2.0.10
Fix Version/s: 2.1.0-M1

Time Tracking:
Not Specified

Complexity: Intermediate


 Description  « Hide

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).



John Casey added a comment - 01/Aug/08 11:36 AM

Initially reported steps to reproduce:

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