Maven
  1. Maven
  2. MNG-4768

Depending on declaration order, nearest matching version does not win when version range is involved in conflict

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.2.1, 3.0-beta-2
    • Fix Version/s: 3.0-beta-3
    • Component/s: Dependencies
    • Labels:
      None
    • Complexity:
      Intermediate
    • Number of attachments :
      0

      Description

      Consider these two dirty trees that differ only by the order of direct dependencies:

      project
      +- a:1.0
      +- b:0.1
      |  \- c:0.1
      |     \- a:[2.0,3)
      \- d:0.1
         \- a:2.0
      
      project
      +- a:1.0
      +- d:0.1
      |  \- a:2.0
      \- b:0.1
         \- c:0.1
            \- a:[2.0,3)
      

      Further assume the repository contains version 1.0, 2.0 and 2.1 of a. Also note that each occurrence of a appears on a different tree depth.

      The first tree picks version 2.0, the latter 2.1 (from the range), although 2.0 is the nearer declaration (lower depth).

        Issue Links

          Activity

          Benjamin Bentmann made changes -
          Field Original Value New Value
          Link This issue is related to MNG-303 [ MNG-303 ]
          Benjamin Bentmann made changes -
          Link This issue is related to MNG-820 [ MNG-820 ]
          Benjamin Bentmann made changes -
          Summary Create integration test to check nearest-match wins when using version ranges Depending on declaration order, nearest matching version does not win when version range is involved in conflict
          Issue Type Task [ 3 ] Bug [ 1 ]
          Affects Version/s 3.0-beta-2 [ 16090 ]
          Affects Version/s 2.2.1 [ 15328 ]
          Priority Minor [ 4 ] Major [ 3 ]
          Description Verify that for a dirty tree like
          {noformat}
          project
          +- a:1.0
          +- b:0.1
          | \- c:0.1
          | \- a:[2.0,3)
          \- d:0.1
             \- a:2.0
          {noformat}
          the selected version of {{a}} is 2.0, i.e. the nearest version that matches all hard constraints imposed by ranges.
          Consider these two dirty trees that differ only by the order of direct dependencies:
          {noformat}
          project
          +- a:1.0
          +- b:0.1
          | \- c:0.1
          | \- a:[2.0,3)
          \- d:0.1
             \- a:2.0
          {noformat}
          {noformat}
          project
          +- a:1.0
          +- d:0.1
          | \- a:2.0
          \- b:0.1
             \- c:0.1
                \- a:[2.0,3)
          {noformat}
          Further assume the repository contains version 1.0, 2.0 and 2.1 of {{a}}. Also note that each occurrence of {{a}} appears on a different tree depth.

          The first tree picks version 2.0, the latter 2.1 (from the range), although 2.0 is the nearer declaration (lower depth).
          Component/s Dependencies [ 12028 ]
          Component/s Integration Tests [ 11866 ]
          Benjamin Bentmann made changes -
          Link This issue relates to MNG-4690 [ MNG-4690 ]
          Benjamin Bentmann made changes -
          Status Open [ 1 ] Closed [ 6 ]
          Assignee Benjamin Bentmann [ bentmann ]
          Fix Version/s 3.0-beta-3 [ 16681 ]
          Resolution Fixed [ 1 ]

            People

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

              Dates

              • Created:
                Updated:
                Resolved: