I want to install few jars to my local maven repo with maven-install-plugin. My maven 3.2.1 installation uses version 2.4 of this plugin which requires a lot of parameters to specify. I would like to use version 2.5 that requires less parameters, as mentioned on http://maven.apache.org/plugins/maven-install-plugin/usage.html. If I run mvn install:install-file
from the folder that has a pom.xml file with the following, then it uses version 2.5:
<pluginManagement>
<plugins>
<plugin>
<artifactId>maven-install-plugin</artifactId>
<version>2.5</version>
</plugin>
</plugins>
Otherwise, it still uses the old plugin. How do I force Maven to use maven-install-plugin version 2.5 (if I run install-file from any folder)?
P.S. How to install third party source and javadoc JARs? does not contain the answer.
Answered in comments:
Run mvn org.apache.maven.plugins:maven-install-plugin:2.5:install-file. – Aleksandr M Aug 8 '14 at 8:47
Clarification:
Aleksandr M means that this is possible using the install-file
goal of the maven-install-plugin. This requires you to specify the file to be installed using the -file
flag. This is explained in more detail in the maven documentation.