Skip to content

Instantly share code, notes, and snippets.

@bpedman
bpedman / readme.md
Last active October 4, 2017 19:36 — forked from cedricwalter/readme.md
Sonatype NEXUS 2 has a rest API :-) but NEXUS 3 has none/not ready, the following simulate curl/wget call

Fetching artifact programmatically through REST/API fro Nexus2/3

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

Nexus 2.x

Nexus 2.x had a REST API to download artifacts based on some Maven GAV co-ordinates

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

or

#!/bin/sh
# Written by Mike Ensor ([email protected])
# Copywrite 2012
# Use as needed, modify, have fun!
# This is intended to be used for Maven3 + Mac OSX
#
# Modified by Raman Gupta ([email protected])
# - proper escaping of sed capture groups (needed for Linux?)
# - tabs replaced with four spaces for consistency across editors