Skip to content

Instantly share code, notes, and snippets.

@crimeminister
Created July 18, 2014 19:04
Show Gist options
  • Save crimeminister/bed63154c1a031651898 to your computer and use it in GitHub Desktop.
Save crimeminister/bed63154c1a031651898 to your computer and use it in GitHub Desktop.
add some JAR files to a local Maven repository (allowing use of unpublished JARs in a Clojure project)
#!/usr/bin/
for file in $(ls lib/*.jar); do
#mvn install:install-file -Dfile=jaad-0.8.3.jar -DartifactId=jaad -Dversion=0.8.3 -DgroupId=jaad -Dpackaging=jar -DlocalRepositoryPath=maven_repository
artifact_id=`basename $file | sed s/\.jar$// | sed -E s/-[0-9]\+\.[0-9]\+\.[0-9]\+//`
version=`basename $file | sed s/\.jar$// | sed -E s/[a-zA-Z\-]*//`
group_id=com.theplatform
local_repo=mvn
mvn deploy:deploy-file -DcreateChecksum=true -Dfile=$file -DartifactId=$artifact_id -Dversion=$version -DgroupId=$group_id -Dpackaging=jar -Durl=file:$loca
l_repo
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment