Maven
  1. Maven
  2. MNG-1142

restriction of [1.6,) and [1.5,1.6.2) in that order results in 1.6.2 instead of 1.6.1

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.0.7
    • Labels:
      None
    • Complexity:
      Intermediate
    • Number of attachments :
      0

      Description

      got this by adding ant [1.6,) to it0034, and ant [1.5,1.6.2) to one of its deps (deeper).

      I think this is caused by the fact that versions are resolved too early instead of retaining the restriction, but it needs a further look.

        Issue Links

          Activity

          Hide
          Brett Porter added a comment -

          from MNG-1208

          Found while searching for MNG-1207

          a call to VersionRange.getSelectedVersion() will return the upper bound even if the upper bound is exclusive. (and isSelectedVersionKnown would return false). This method should throw an exception if the selectedVersion is not known.

          else
          {
          Restriction restriction = (Restriction) restrictions.get( restrictions.size() - 1 );

          version = restriction.getUpperBound();
          if ( version == null )

          { version = RELEASE; }

          }

          Show
          Brett Porter added a comment - from MNG-1208 Found while searching for MNG-1207 a call to VersionRange.getSelectedVersion() will return the upper bound even if the upper bound is exclusive. (and isSelectedVersionKnown would return false). This method should throw an exception if the selectedVersion is not known. else { Restriction restriction = (Restriction) restrictions.get( restrictions.size() - 1 ); version = restriction.getUpperBound(); if ( version == null ) { version = RELEASE; } }
          Hide
          Micah Whitacre added a comment -

          This issue is also occurring when I am not excluding the upper bound of the version range. As an example I have a dependency on which I use the range [3,3.3], it always resolves to try and find the version 3.3 even though that version does not exist in any of the repositories I have listed.

          Show
          Micah Whitacre added a comment - This issue is also occurring when I am not excluding the upper bound of the version range. As an example I have a dependency on which I use the range [3,3.3] , it always resolves to try and find the version 3.3 even though that version does not exist in any of the repositories I have listed.
          Hide
          Benjamin Bentmann added a comment -

          Got fixed alongside of MNG-2988.

          Show
          Benjamin Bentmann added a comment - Got fixed alongside of MNG-2988 .

            People

            • Assignee:
              Benjamin Bentmann
              Reporter:
              Brett Porter
            • Votes:
              2 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: