Skip to content

Instantly share code, notes, and snippets.

@chabala
Last active August 29, 2015 13:56
Show Gist options
  • Save chabala/9127256 to your computer and use it in GitHub Desktop.
Save chabala/9127256 to your computer and use it in GitHub Desktop.
Four ways to get foreign jars into Maven, in order of preference
#deploy to repo with pom
mvn -Durl=scpexe://yourrepo/maven2 \
-Dfile=ojdbc6-11.2.0.3.0.jar \
-DgroupId=com.oracle -DartifactId=ojdbc6 \
-Dversion=11.2.0.3.0 -Dpackaging=jar \
-DpomFile=ojdbc6-11.2.0.3.0.pom \
deploy:deploy-file
#deploy to repo and generate pom
mvn -Durl=scpexe://yourrepo/maven2 \
-Dfile=ojdbc6-11.2.0.3.0.jar \
-DgroupId=com.oracle -DartifactId=ojdbc6 \
-Dversion=11.2.0.3.0 -Dpackaging=jar \
-DgeneratePom=true \
deploy:deploy-file
#install locally with pom
mvn -Dfile=ojdbc6-11.2.0.3.0.jar \
-DgroupId=com.oracle -DartifactId=ojdbc6 \
-Dversion=11.2.0.3.0 -Dpackaging=jar \
-DpomFile=ojdbc6-11.2.0.3.0.pom \
install:install-file
#install locally and generate pom
mvn -Dfile=ojdbc6-11.2.0.3.0.jar \
-DgroupId=com.oracle -DartifactId=ojdbc6 \
-Dversion=11.2.0.3.0 -Dpackaging=jar \
-DgeneratePom=true \
install:install-file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment