Uploaded image for project: 'Ivy'
  1. Ivy
  2. IVY-1476

Support timestamped SNAPSHOT versions from Maven repository

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.4.0
    • 2.5.0-rc1
    • Maven Compatibility
    • sbt 0.13.5 | Sonatype Nexus 2.7.2-0 | Apache Maven 3.2.1 | play 2.2.3

    Description

      Background

      I am developing a Play 2.2.3 application; the Play build system uses sbt. The latter again uses Apache Ivy to implement managed dependencies.

      Furthermore, I am using Sonatype Nexus OSS to manage various libraries built and deployed by Maven. At the moment, I am deploying snapshot versions of those libraries. For instance:

      <groupId>myGroup</groupId>
      <artifactId>myArtifact</artifactId>
      <version>0.1-SNAPSHOT</version>

      The Play application depends on snapshot versions of those libraries.

      Intention

      In the Play project, I want to use a specific (thus, "timestamped") snapshot version of a dependency – say 0.1-20140509.053703-1 – instead of the latest one as specified by 0.1-SNAPSHOT.

      Issue - Overview

      While the latter works perfectly well, sbt (or, Ivy in the background) seems to be unable to resolve the specific version. At least sbt constructs the URL pointing to that specific version faultily: The name of the directory that contains the artifact ends with the actual timestamp instead of string SNAPSHOT.

      Issue - Concrete Example

      I created a new Play application and added the following dependency in file build.sbt: libraryDependencies += "myGroup" % "myArtifact" % "0.1-20140509.053703-1"

      When resolving that dependency, sbt constructs URLs ending with myGroup/myArtifact/0.1-20140509.053703-1/myArtifact-0.1-20140509.053703-1.pom.

      Note that the 3rd path component is 0.1-20140509.053703-1. Thus, the directory containing artifact myArtifact incorrectly contains the timestamp as well.

      The correct directory name would be 0.1-SNAPSHOT; thus, using SNAPSHOT instead of the actual timestamp. The complete correct URL would thus end with myGroup/myArtifact/0.1-SNAPSHOT/myArtifact-0.1-20140509.053703-1.pom.

      Referring to the latest snapshot version instead by using dependency entry libraryDependencies += "myGroup" % "myArtifact" % "0.1-SNAPSHOT" works as expected. The URLs end with 0.1-SNAPSHOT/myArtifact-0.1-SNAPSHOT.pom.

      References

      • I reported the above issue at Stack Overfow. However, I haven't got any answer so far.
      • I created sbt issue #1325. However, Josh Suereth points out that the issue is caused by Ivy which "never migrated to maven's new snapshot system".
      • Mark Derricutt writes that "AFAIK Ivy doesn't support timestamped SNAPSHOTs from a repository".

      Attachments

        Issue Links

          Activity

            People

              jaikiran Jaikiran Pai
              mburger Martin Burger
              Votes:
              4 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: