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

[regression] User properties override equally named POM properties of transitive dependencies

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.0
    • Fix Version/s: 3.0.2
    • Labels:
      None

      Description

      While trying to run the core ITs using -DmavenVersion=3.0.1 the build ended up with a resolution failures for a bunch of non-existing artifacts like maven-reporting-api:3.0.1. The problematic artifact versions were coming from a wrong dependency tree like this:

      DEBUG] org.apache.maven.plugins:maven-resources-plugin:jar:2.3:
      DEBUG]    org.apache.maven:maven-plugin-api:jar:2.0.6:compile
      DEBUG]    org.apache.maven:maven-project:jar:2.0.6:compile
      DEBUG]       org.apache.maven:maven-settings:jar:3.0.1:compile
      DEBUG]       org.apache.maven:maven-profile:jar:3.0.1:compile
      DEBUG]       org.apache.maven:maven-model:jar:3.0.1:compile
      DEBUG]       org.apache.maven:maven-artifact-manager:jar:3.0.1:compile
      DEBUG]       org.apache.maven:maven-plugin-registry:jar:3.0.1:compile
      DEBUG]       org.apache.maven:maven-artifact:jar:3.0.1:compile
      

      Note that the dependencies of maven-project:2.0.6 use the wrong version.

      The problem is due to maven:pom:2.0.6 using the POM property mavenVersion which erroneously gets overridden by my user property.

      During dependency resolution, user properties must be treated like system properties and must not override POM properties.

        Issue Links

          Activity

          Hide
          bentmann Benjamin Bentmann added a comment -

          Fixed in r1038391.

          Show
          bentmann Benjamin Bentmann added a comment - Fixed in r1038391 .
          Hide
          ralphgoers Ralph Goers added a comment -

          Actually, this strikes me as being a duplicate of MNG-2971. Once an artifact has been installed these variables should have been replaced with the variables used during the release.

          Show
          ralphgoers Ralph Goers added a comment - Actually, this strikes me as being a duplicate of MNG-2971 . Once an artifact has been installed these variables should have been replaced with the variables used during the release.

            People

            • Assignee:
              bentmann Benjamin Bentmann
              Reporter:
              bentmann Benjamin Bentmann
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development