Created
March 10, 2015 17:12
-
-
Save llbit/3fb2bf9d4f893d8ace11 to your computer and use it in GitHub Desktop.
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/bash | |
if [ $# -lt "1" ]; then | |
echo "This script copies a maven artifact to a local directory" | |
echo "Usage: mvnget artifactID [dest-dir]" | |
echo " artifactID is <group:project:version>" | |
exit 1 | |
fi | |
if [ $# -gt "2" ]; then | |
echo "Too many arguments!" | |
exit 1 | |
fi | |
DEST="${2-$PWD}" | |
mvn org.apache.maven.plugins:maven-dependency-plugin:2.8:copy \ | |
-Dartifact="$1" \ | |
-DoutputDirectory="$DEST" \ | |
-Dmdep.useBaseVersion=true |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment