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

-pl, -am and -amd options don't consider the version of the artefacts for building the reactor

    XMLWordPrintableJSON

Details

    Description

      Here is the configuration:

      root 1.0-SNAPSHOT - aggregate project, not a parent one

      • maven-bug1 1.1-SNAPSHOT - no parent
      • maven-bug2 1.0-SNAPSHOT - no parent - depends on maven-bug1 1.1-SNAPSHOT

      run mvn clean -am -pl maven-bug2
      observe that the project reactor builds maven-bug1 then maven-bug2 as expected based on the dependency graph

      navigate to maven-bug1-to-install
      run mvn install to install a maven-bug1 version 1.0 in the local repo
      navigate back to the parent folder

      run mvn clean -am -pl maven-bug2
      observe that the project reactor builds maven-bug1 then maven-bug2 as expected based on the dependency graph

      update the maven-bug2 pom to depend on maven-bug1 1.0

      run mvn clean -am -pl maven-bug2
      observe that the project reactor still builds maven-bug1 then maven-bug2 although maven-bug2 doesn't depend on maven-bug1 within this aggregate configuration (different version).

      I think the version is never considered when the reactor builds the list of project to build and should.

      This issue relates to MNG-4237

      The problem with this behaviour is that artifacts get build within the reactor for nothing typically when releasing as some of the artifacts within the reactor get released for no reason.

      Attachments

        1. MVN-bug.zip
          2 kB
          nicolas lescure

        Issue Links

          Activity

            People

              bentmann Benjamin Bentmann
              nicopatche nicolas lescure
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: