Nexus 3 REST API to download Maven artifacts

6,729 views
Skip to first unread message

DK

unread,
Sep 23, 2016, 10:09:13 AM9/23/16
to Nexus Users

Hi,


Nexus 2.x had a REST API to download artifacts like below based on some Maven GAV co-ordinates but this no longer works for Nexus 3.x

wget "http://local:8081/service/local/artifact/maven/redirect?g=com.mycompany&a=my-app&v=LATEST" --content-disposition


How can I do this in Nexus 3.0.0-03?

Peter Lynch

unread,
Sep 26, 2016, 9:22:06 AM9/26/16
to DK, Nexus Users
Hi,

There is no equivalent single REST API to do this yet.

We have a backlog item to add a similar API though.

In order to make sure we implement an API that meets your needs, can you please comment on your exact use case in needing the API in the first place?

-Peter

--
You received this message because you are subscribed to the Google Groups "Nexus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nexus-users+unsubscribe@glists.sonatype.com.
To post to this group, send email to nexus...@glists.sonatype.com.
To view this discussion on the web visit https://groups.google.com/a/glists.sonatype.com/d/msgid/nexus-users/92f5b895-6004-4509-b64f-ad881b3da46e%40glists.sonatype.com.
For more options, visit https://groups.google.com/a/glists.sonatype.com/d/optout.

DK

unread,
Sep 26, 2016, 10:23:45 AM9/26/16
to Nexus Users, desmond...@gmail.com
Hi,

My usecase is for Integration testing. It was useful to pull down the latest snaphsot or release build from Nexus.

  • We have a script that uses above API call to pull down the LATEST maven artifcats every night from Nexus and deploys them.
  • We also a use this API to pull down the latest RELEASE maven artifcats every night from Nexus and deploys them.
Can you send on the JIRA number so I can track the progress of this similar API?

Arnaud

unread,
Nov 17, 2016, 11:19:23 AM11/17/16
to Nexus Users, desmond...@gmail.com
Hi,

Also interested in tracking the progress of this issue. Any link for this please ?

(we need too to use Rest API or whatelse ever, to download latest artifact from shell script and deploy it in our karaf container)

Arnaud

Dale Stewart

unread,
Dec 20, 2016, 12:05:35 AM12/20/16
to Nexus Users, desmond...@gmail.com
Hi,

We also need a Rest API in order to download the latest artifact for System testing prior to going live to Production.

Do we have a jira issue or a link I can use to follow this please.

Thanks

Dale

Peter Lynch

unread,
Dec 20, 2016, 4:26:58 PM12/20/16
to Dale Stewart, Nexus Users, DK
Everyone has their own version of LATEST. Variations include:

- latest available already downloaded to Nexus
- latest available at remote site, not already downloaded into Nexus
- latest deployed by date in hosted repo
- latest major, minor or micro version according to semantic versioning
- latest version number as sorted by Maven's interpretation of version sort ( not semantic )
- latest version as determined by specific version ranges ( as defined by Maven or IVY or ... )
- latest version specific to other repository formats...

Given these variations, we are certainly interested in your very specific needs.

You can follow the progress and add suggestions on any of your REST API needs based on your existing use of Nexus 2.x REST API by reviewing and following the sub-tasks of this issue:


-Peter

 
Thanks

Dale

--
You received this message because you are subscribed to the Google Groups "Nexus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nexus-users+unsubscribe@glists.sonatype.com.
To post to this group, send email to nexus...@glists.sonatype.com.

cédric walter

unread,
May 30, 2017, 6:22:36 AM5/30/17
to Nexus Users, desmond...@gmail.com
Hi

try my workaround, work but required curl, use maven


Regards
Cédric

Peter Lynch

unread,
May 30, 2017, 11:31:55 AM5/30/17
to cédric walter, Nexus Users, DK
On Tue, May 30, 2017 at 7:22 AM, cédric walter <cedric...@gmail.com> wrote:
Hi

try my workaround, work but required curl, use maven



FYI - simply this command without any pom will do the same:

mvn org.apache.maven.plugins:maven-dependency-plugin:3.0.1:copy -Dartifact=log4j:log4j:1.2.17:jar -DoutputDirectory=./
 
Regards
Cédric

On Tuesday, December 20, 2016 at 6:05:35 AM UTC+1, Dale Stewart wrote:
Hi,

We also need a Rest API in order to download the latest artifact for System testing prior to going live to Production.

Do we have a jira issue or a link I can use to follow this please.

Thanks

Dale

--
You received this message because you are subscribed to the Google Groups "Nexus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nexus-users+unsubscribe@glists.sonatype.com.
To post to this group, send email to nexus...@glists.sonatype.com.

Bismaya Mohapatra

unread,
Aug 9, 2017, 8:02:17 AM8/9/17
to Nexus Users, cedric...@gmail.com, desmond...@gmail.com
We are using Nexus 3.4.0 and  we are able to download the latest version by using LATEST in pom.xml. It is not showing any latest tag in maven-metadata.xml but still we are able to download.
However REST api is not working.


On Tuesday, May 30, 2017 at 9:01:55 PM UTC+5:30, Peter Lynch wrote:
On Tue, May 30, 2017 at 7:22 AM, cédric walter <cedric...@gmail.com> wrote:
Hi

try my workaround, work but required curl, use maven



FYI - simply this command without any pom will do the same:

mvn org.apache.maven.plugins:maven-dependency-plugin:3.0.1:copy -Dartifact=log4j:log4j:1.2.17:jar -DoutputDirectory=./
 
Regards
Cédric

On Tuesday, December 20, 2016 at 6:05:35 AM UTC+1, Dale Stewart wrote:
Hi,

We also need a Rest API in order to download the latest artifact for System testing prior to going live to Production.

Do we have a jira issue or a link I can use to follow this please.

Thanks

Dale

--
You received this message because you are subscribed to the Google Groups "Nexus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nexus-users...@glists.sonatype.com.

To post to this group, send email to nexus...@glists.sonatype.com.

陈灵敏

unread,
Aug 15, 2017, 10:18:37 AM8/15/17
to Nexus Users
look this. https://github.com/nongfenqi/nexus3-rundeck-plugin

在 2016年9月23日星期五 UTC+8下午10:09:13,DK写道:
Reply all
Reply to author
Forward
0 new messages