Reputation: 291
Is there some kind of parametrized url on archiva, where I can get the latest snapshot/release of an artifact? sth like https://myhappyarchiva.com/archiva/repository/com.example/com/example/myproject/LATEST/myproject-LATEST.jar
Upvotes: 4
Views: 2371
Reputation: 3395
Try something like: "http://myhappyarchiva.com/archiva/restServices/archivaServices/searchService/artifact?r=#releases&g=com.myhappyarchiva&a=myproject&v=LATEST"
The basics are: "http://[host_name]/archiva/restServices/archivaServices/searchService/artifact?r=[release_option]&g=[group_id]&a=[artifact_id]&v=[version]&c=[classifer]"
The labels are displayed in the tables on archiva. So you can easily look up the references.
I believe you can use "p" to be packaging as well. It can be like: "jar","pom","javadoc" basically file types. So that would look like, "&p=jar" added onto the request.
It you are following the requests it sometimes goes through a 307 temporary redirect and 302 found redirect before the repo starts to download.
You do this with curl or wget. Or in a script (I made a ruby script).
Example of wget: https://archiva.apache.org/docs/2.2.0/userguide/querying-artifacts.html
Upvotes: 3
Reputation: 5867
That feature is not yet available, however you might like to file an issue at http://jira.codehaus.org/browse/MRM. A related issue is http://jira.codehaus.org/browse/MRM-805.
To achieve this today, the best thing to do is either:
<release>
or <latest>
elementUpvotes: 2