3- Creating a different local Maven repository. The Install Plugin has 3 goals: install:install is used to automatically install the project's main artifact (the JAR, WAR or EAR), its POM and any attached artifacts (sources, javadoc, etc) produced by a particular project. By default, the Apache Maven Install Plugin uses the local repository defined in the settings.xml to install an artifact. General information about how to copy jars into your local repository can be found in the Guide to installing 3rd party JARs.
Guide to installing 3rd party JARs. Installing Apache Maven The installation of Apache Maven is a simple process of extracting the archive and adding the `bin` folder with the `mvn` command to the `PATH`.
This answers the original question. Installing an artifact to a specific local repository path. The third solution is quite similar to the first one, the difference lies in the fact that the JARs will be installed in a different local Maven repository. Extract distribution archive in … ${basedir} represents the directory containing pom.xml. I've encountered some errors when I tried to install an artifact manually with Maven 2. Detailed steps are: Ensure JAVA_HOME environment variable is set and points to your JDK installation. I find myself once again in the situation that I have to install the Oracle JDBC driver into my local Maven repository. Goals Overview. Although rarely, but sometimes you will have 3rd party JARs that you need to put in your local repository for use in your builds, since they don't exist in any public repository like Maven Central. Manually installing a Maven artifact in your local repository. ; install:install-file is mostly used to install an externally created artifact into the local repository, along with its POM. mvn install (4) According to maven's Guide to installing 3rd party JARs, the command is: mvn install:install-file -Dfile= -DgroupId= \ -DartifactId= -Dversion= -Dpackaging= You need indeed the packaging option. plugin - How to manually install an artifact in Maven 2?