Created
April 27, 2012 15:36
-
-
Save arguile-/2510227 to your computer and use it in GitHub Desktop.
Basic Curl deploy file to Nexus
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
SERVER="http://localhost:8081" | |
URL="$SERVER/nexus/service/local/artifact/maven/content" | |
REPO="sandbox" | |
USER="admin:admin123" | |
group=$1 | |
artifact=$2 | |
version=$3 | |
classifier=$4 | |
ext=$5 | |
filename=$6 | |
curl --write-out "\nStatus: %{http_code}\n" \ | |
--request POST \ | |
--user $USER \ | |
-F "r=$REPO" \ | |
-F "g=$group" \ | |
-F "a=$artifact" \ | |
-F "v=$version" \ | |
-F "c=$classifier" \ | |
-F "p=$ext" \ | |
-F "file=@$filename" \ | |
"$URL" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I haven't verified this, but I'm guessing that "--request POST" is redundant. It's somewhat logical, as "-F" forms POST data.