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

Resolving of a transitive dependency with a range of versions includes snapshot version

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Not A Bug
    • 3.0.5, 3.3.1, 3.3.3
    • None
    • None

    Description

      I have a project with the dependency

      <dependency>
      <groupId>org.glassfish.web</groupId>
      <artifactId>javax.servlet.jsp</artifactId>
      <version>2.3.2</version>
      </dependency>

      Which in turn has the following dependency:

      <dependency>
      <groupId>org.glassfish</groupId>
      <artifactId>javax.el</artifactId>
      <version>[3.0.0,)</version>
      </dependency>

      When building this project maven also downloads snapshot versions of this artifact from "https://maven.java.net/content/repositories/snapshots/org/glassfish/javax.el/maven-metadata.xml"

      However, if in my pom I add an exclusion for javax.el under javax.servlet.jsp, and then add that exact same dependency it does not attempt to download the snapshot version


      To reproduce:
      1) Create a maven project containing only the attached pom.xml.
      2) Compile the attached pom as is, see that it downloads the snapshot version

      3) Unignore the exclusion and the dependency
      4) Delete <local-repo>/org/glassfish/javax.el (with sub directories)
      5) Re-compile to see it does not download the snapshot version

      Attachments

        1. debug-log.txt
          87 kB
          Guy Marom
        2. pom.xml
          1.0 kB
          Guy Marom

        Activity

          People

            Unassigned Unassigned
            guy.marom Guy Marom
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: