0
votes

I know there is a way to request an endpoint and download the lastest Maven Snapshot from Artifactory because this JIRA Ticket says that JFrog people resolved it, but I can't find anywhere the exact syntax of the URL. (The URL in the ticket doesn't work)

Does anybody knows how to download the lastest Maven Snapshot for a given module via endpoint (not via script, only requesting the endpoint)?

I need to download de .tar.gz package.

1
I doubt there is a URL for getting the latest. Instead, you could do through the special tag <version>LATEST</version> in your pom, and them run mvn dependency:get to download it. Wouldn't it be useful for you? - Little Santi

1 Answers

3
votes

To download the latest Maven unique snapshot version of an artifact from Artifactory you should use the following

http://localhost:8080/artifactory/<REPO-KEY>/<GROUPD-ID>/<ARTIFACT-ID>/<VERSION>-SNAPSHOT/<ARTIFACT-ID>-<VERSION>-SNAPSHOT.jar

Where:

  • REPO-KEY - the Artifactory repository key (identifier)
  • GROUP-ID - maven groupdId (delimited by /)
  • ARTIFACT-ID - maven artifactId
  • VERSION - maven version

For example:

http://localhost:8080/artifactory/libs-release-local/ch/qos/logback/logback-classic/0.9.9-SNAPSHOT/logback-classic-0.9.9-SNAPSHOT.jar

To download the latest release artifact you should use [RELEASE] as the version, for example:

http://localhost:8080/artifactory/ivy-local/org/acme/[RELEASE]/acme-[RELEASE].jar

For more info see the Artifactory REST API documentation