Skip to content

Instantly share code, notes, and snippets.

@stepancheg
Created June 3, 2012 14:53
Show Gist options
  • Save stepancheg/2863814 to your computer and use it in GitHub Desktop.
Save stepancheg/2863814 to your computer and use it in GitHub Desktop.
#!/bin/sh -ex
ivy_version="2.3.0-rc1"
classes_file="lib/ivy/ivy-$ivy_version.jar"
sources_file="lib/ivy/ivy-$ivy_version-sources.jar"
if [ ! -e $classes_file ]; then
mkdir -p lib/ivy
curl --silent --output $classes_file.tmp \
http://repo1.maven.org/maven2/org/apache/ivy/ivy/$ivy_version/ivy-$ivy_version.jar
curl --silent --output $sources_file.tmp \
http://repo1.maven.org/maven2/org/apache/ivy/ivy/$ivy_version/ivy-$ivy_version-sources.jar
mv $sources_file.tmp $sources_file
mv $classes_file.tmp $classes_file
fi
ivy() {
java -jar $classes_file -settings ivysettings.xml "$@"
}
rm -rf lib/dep
ivy -retrieve 'lib/dep/[organisation]-[artifact]-[revision]-[type].[ext]' -types jar
ivy -retrieve 'lib/dep/[organisation]-[artifact]-[revision]-[type].[ext]' -types source
# vim: set ts=4 sw=4 et:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment