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

Version range resolution downloads all poms, not just the highest version

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • Core
    • None

    Description

      When specifying a version range for a dependency, maven will download and try to resolve all poms in that range which satisfy the range. The usage however is only to use the highestVersion. This causes two issues:

      1. Performance - it's downloading numerous poms that aren't needed.
      2. Fragility - if the version range covers any "bad" poms, then the build will fail. For example, consider that for a specific version, the parent of a pom is not present in the repository. This is enough to fail any build with a version range covering that specific version, as the range resolution stage will not complete. This is particularly harmful when that version would not be selected as the highest, anyway.

      Recommend to have a system property to control the desired behavior - it should be possible to short-circuit loading all the versions and to just to load the highest version.

      For another user report of this see: https://stackoverflow.com/questions/25047859/restrict-maven-to-not-download-all-poms

       

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              mnk Moti Nisenson-Ken
              Votes:
              1 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

                Created:
                Updated: