Example of importing into your local Maven repository

You cannot get to some *.jar files remotely and you still need to build your project, you can use these commands to import into your local repository.

Example:

call mvn install:install-file -Dfile=/c/jars/ehcache-2.7.2.jar -DgroupId=net.sf.ehcache -DartifactId=ehcache -Dversion=2.7.2 -Dpackaging=jar

copy C:\jars\ehcache-2.7.2.jar C:\Users\userid\.m2\repository\net\sf\ehcache\ehcache\2.7.2\ehcache-2.7.2.jar.sha1

Refer: sample-maven-local-import.txt

Leave a Reply