Gad Sakin
Gad Sakin

Reputation: 101

Maven - Install without compile

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)?

Upvotes: 10

Views: 14173

Answers (2)

Michael-O
Michael-O

Reputation: 18415

Simply do mvn install:install instead of mvn install.

Upvotes: 18

Augusto
Augusto

Reputation: 30062

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.

Upvotes: 6

Related Questions