Skip to content

Instantly share code, notes, and snippets.

@chainq
Created January 12, 2018 11:33
Show Gist options
  • Save chainq/ae31c320a26b230fa49c0b9373240d94 to your computer and use it in GitHub Desktop.
Save chainq/ae31c320a26b230fa49c0b9373240d94 to your computer and use it in GitHub Desktop.
Gets a pair of .jar/.pom files from Maven central
#!/bin/sh
HOST=https://repo.maven.apache.org/maven2/
WGET_OPTS="-N -nH -x --cut-dirs=1"
ARG=$1
if [ -z "$ARG" ]; then
echo "No arg."
exit
fi
JAR="$HOST${ARG%.*}.jar"
POM="$HOST${ARG%.*}.pom"
wget $WGET_OPTS "$JAR"
wget $WGET_OPTS "$POM"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment