Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Maven - Install without compile

Tags:

maven

Assume I have the jar under the target folder: Is there any option in maven to install into local repository jar without executing previous phases (compile, package)?

like image 947
Gad Sakin Avatar asked Aug 21 '11 14:08

Gad Sakin


2 Answers

Simply do mvn install:install instead of mvn install.

like image 171
Michael-O Avatar answered Sep 30 '22 01:09

Michael-O


Taken form the documentation:

mvn install:install-file -Dfile=<path-to-file> -DgroupId=<group-id> \
-DartifactId=<artifact-id> -Dversion=<version> -Dpackaging=<packaging>

you need to run this once for the pom and once for the jar.

like image 31
Augusto Avatar answered Sep 30 '22 02:09

Augusto