Search code examples
gradleartifactory

Artifactory: snapshot url returns 404


I have got an artifactory repository where snapshot builds are pushed. According to JFrog we can get the latest version of the snapshot build with simply referring to the logical *SNAPSHOT.jar which resolves to the latest snapshot version. But I am getting 404:

curl  -u "foo:bar" https://artifactory.foo.bar/artifactory/libs-snapshot-local/foo/bar/baz/baz-integration/0.1-SNAPSHOT/baz-integration-0.1-SNAPSHOT.jar

Listing the directory (note list) indicates there are two snapshots:

 curl  -u "foo:bar" https://artifactory.foo.bar/artifactory/list/libs-snapshot-local/foo/bar/baz/baz-integration/0.1-SNAPSHOT/

[...]

../
baz-integration-0.1-20190611.121035-1.jar   11-Jun-2019 12:10  18.85 MB
baz-integration-0.1-20190611.121035-1.pom   11-Jun-2019 12:10  1.34 KB
baz-integration-0.1-20190612.081950-2.jar   12-Jun-2019 08:19  18.85 MB
baz-integration-0.1-20190612.081950-2.pom   12-Jun-2019 08:19  1.34 KB
maven-metadata.xml                              12-Jun-2019 08:19  781 bytes

[...]

Checked also the maven-metadata.xml file in folder 0-1.SNAPSHOT, it says that the latest buildNumber is 2 which seems to be correct.

  <artifactId>baz-integration</artifactId>
  <version>0.1-SNAPSHOT</version>
  <versioning>
    <snapshot>
      <timestamp>20190612.081950</timestamp>
      <buildNumber>2</buildNumber>[...]

Using artifactory 6.5.9 and pushing builds with gradle.

So, why 404?


Solution

  • This is caused by the license being the OSS. The support for retrieving the latest SNAPSHOT version is only supported in the PRO version.