Installing an artifact to a specific local repository path

By default, Maven Install Plugin uses the local repository defined in the settings.xml to install an artifact.

You could install an artifact on a specific local repository by setting the localRepositoryPath parameter when installing.

mvn install:install-file  -Dfile=path-to-your-artifact-jar \
                          -DgroupId=your.groupId \
                          -DartifactId=your-artifactId \
                          -Dversion=version \
                          -Dpackaging=jar \
                          -DlocalRepositoryPath=path-to-specific-local-repo