PalBo
PalBo

Reputation: 2612

404 Not Found when trying to download artifact from Nexus using wget

I have a Nexus server running on a linux VM on IP 192.168.56.2:8081. My repo in Nexus has the structure shown in the picture below. I am trying to download the latest snapshot artifact using wget and I'm using the command sudo wget --user=user --password=password "http://192.168.56.2:8081/nexus/service/local/artifact/maven/content?g=TestingJenkins&a=testingjenkins&v=1.0-SNAPSHOT&r=JENKINSTEST-SNAP" --content-disposition.

This gives me the error below:

--2019-07-11 02:22:18-- http://192.168.56.2:8081/nexus/service/local/artifact/maven/content?g=TestingJenkins&a=testingjenkins&v=1.0-SNAPSHOT&r=JENKINSTEST-SNAP Connecting to 192.168.56.2:8081... connected. HTTP request sent, awaiting response... 404 Not Found 2019-07-11 02:22:18 ERROR 404: Not Found.

Does anyone have any idea what might be the issue here? I have opened port 8081 on my firewall.

Nexus repo

Upvotes: 1

Views: 3276

Answers (1)

PalBo
PalBo

Reputation: 2612

Update: Nexus provides a Swagger UI with different API's, some of which can be used to download artifacts. The /v1/search/assets/download/ endpoint can be used to download a specified artifact with a curl query. Simply specify the name of your repository and some optional sorting parameter.

Nexus Swagger UI

Upvotes: 1

Related Questions