How to install a jar manually in local maven repository


Problem Statement: Your pom.xml dependencies is not able to download a certain jar from the repository.
Solution:
You can manually download the jar and add it to your local maven repository.
Assuming this dependency (mentioned in pom.xml) fails (because the jar fails to download):

org.hibernate
hibernate-entitymanager
3.3.2.GA

Then download hibernate-entitymanager-3.3.2.GA manually, and run the command:
mvn install:install-file -DgroupId=org.hibernate -DartifactId=hibernate-entitymanager -Dversion=3.3.2.GA -Dpackaging=jar -Dfile=./hibernate-entitymanager-3.3.2.GA.jar
Thats it, you are all set.
From:
http://qnatech.wordpress.com/2011/07/26/how-to-install-a-jar-manually-in-local-maven-repository/