Uploaded image for project: 'Maven'
  1. Maven
  2. MNG-3693

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

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.0.10
    • 2.1.0-M1
    • POM, Reactor and Workspace
    • None

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

      Attachments

        Activity

          People

            jdcasey John Dennis Casey
            jdcasey John Dennis Casey
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: