I would like to provide a simple URL that will always return the latest version of a snapshot version of an artifact. By simple I mean that the URL doesn’t change, or require the user to browse the directory and examine timestamps.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The core Nexus “redirect” REST API can be used to retrieve any version of an artifact from a nominated repository:
For example:
https://repository.sonatype.org/service/local/artifact/maven/redirect?r=central-proxy&g=log4j&a=log4j&v=LATEST
The v parameter can be a value like 1.0-SNAPSHOT, in which case Maven will return the latest time-stamped snapshot held in the repository. Similiarily the special value “LATEST” should do the same provided a more recent released version is not present.