Skip to content

Instantly share code, notes, and snippets.

@bmjames
Created April 20, 2012 15:38
Show Gist options
  • Save bmjames/2429721 to your computer and use it in GitHub Desktop.
Save bmjames/2429721 to your computer and use it in GitHub Desktop.
Quick'n'dirty ivy2-to-m2 shovel
#!/usr/bin/env bash
# Shovel stuff from ivy cache into m2 cache
if ([ -z "$1" ] || [ -z "$2" ] || [ -z "$3" ]); then
echo "usage: $0 <groupId> <artifactId> <version>"
exit
fi
cd ~/.ivy2/local/$1/$2/$3
mvn install:install-file -DpomFile=poms/$2.pom -Dfile=jars/$2.jar
mvn install:install-file -DpomFile=poms/$2.pom -Dfile=srcs/$2-sources.jar -Dclassifier=sources
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment