User Tools

Site Tools


java:nexus3:latestbyrest

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

java:nexus3:latestbyrest [2020/06/27 18:58] (current)
els created
Line 1: Line 1:
 +<​Code:​bash>​
 +curl --user user:​password -sSL -X GET -G "​https://​nexus.url/​service/​rest/​v1/​search/​assets"​ \
 +  -d repository=maven-snapshots \
 +  -d maven.groupId=info.elsener \
 +  -d maven.artifactId=artifact \
 +  -d maven.baseVersion=1.0.0-SNAPSHOT \
 +  -d maven.extension=zip \
 +  -d maven.classifier=bin \
 +  | grep -Po '"​downloadUrl"​ : "​\K.+(?​=",​)'​ \
 +  | sort \
 +  | tail -1 \
 +  | xargs curl --user user:​password -fsSL -o /​tmp/​artifact-bin.zip
 +</​Code>​
  
 +  - Get all artifact information for base version
 +  - extract download urls
 +  - sort urls (there is a timestamp in)
 +  - get last entry
 +  - download artifact
java/nexus3/latestbyrest.txt ยท Last modified: 2020/06/27 18:58 by els