You will need to do this if you have a local jar file that is not in the Maven central repository and you need the maven build to work. This will also be useful if you are behind a firewall and do not have external access.
- Download the jar file or scp the jar file to the build machine
- At the same directory as the jar file, run the following command to install the jar to the local maven repository
mvn install:install-file -DgroupId= -DartifactId= -Dversion= -Dpackaging=jar -Dfile= -DgeneratePom=true
- Now when you run your maven goals, it will not look for this specific jar file in any external repository.
If you want your Eclipse to start using this jar from your local repository
- Eclipse Luna on a Mac, Window > Show View > Other > Maven > Maven Repositories > Local Repositories > Local Repository
- Right click for the context menu and rebuild index
It should now show up if you try to add this dependency in your pom.xml