Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I install a POM in my local m2 repository?

Tags:

I need to install a parent POM (without a JAR file) into my local .m2 repository. mvn install:install-file won't let me do that, it always asks for a valid -Dfile=<path-to-jar>.

How can I install tmp/dependency-management-1.0.0-SNAPSHOT.pom?

like image 302
Aaron Digulla Avatar asked May 19 '14 14:05

Aaron Digulla


1 Answers

While you need to specify -Dfile, you can tell mvn install:install-file to ignore the file and just install the POM with -Dpackaging=pom:

mvn install:install-file \     -Dpackaging=pom \     -Dfile=tmp/dependency-management-1.0.0-SNAPSHOT.pom \     -DpomFile=tmp/dependency-management-1.0.0-SNAPSHOT.pom 

will just install the POM, ignoring the value passed as file.

like image 152
Aaron Digulla Avatar answered Oct 13 '22 01:10

Aaron Digulla