Skip to content

Instantly share code, notes, and snippets.

@blove
Created June 14, 2013 14:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save blove/5782474 to your computer and use it in GitHub Desktop.
Save blove/5782474 to your computer and use it in GitHub Desktop.
Add artifact to local maven repository
#!/bin/bash
################################################################################
##
## Installs the artifacts to the local maven repository
##
## mvn install:install-file -DgroupId=${dependency.groupId} \
## -DartifactId=${dependency.artifactId} \
## -Dpackaging=${dependency.packaging} \
## -Dversion=${dependency.version} \
## -Dfile=/path/to/the/file -DgeneratePom=true
##
##
################################################################################
BASE_DIR=/Users/brian/acuity/server
dependency_dir="${BASE_DIR}/target/dependency"
# Copy dependencies to the target/dependency folder
#cd $BASE_DIR
#mvn clean dependency:copy-dependencies
# Apache Commons Codec
mvn install:install-file -DgroupId=commons-codec -DartifactId=commons-codec -Dpackaging=jar -Dversion=1.6 -Dfile="${dependency_dir}/commons-codec-1.6.jar" -DgeneratePom=true
# MySQL JDBC Connector
mvn install:install-file -DgroupId=mysql -DartifactId=mysql-connector-java -Dpackaging=jar -Dversion=5.1.16 -Dfile="${dependency_dir}/mysql-connector-java-5.1.16.jar" -DgeneratePom=true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment