Maven: Installing / adding local jar into your local maven repository

I needed to install a local jar file into my laptop’s local maven repository and found this article. I used this approach to install this jar file in my repo:

mvn install:install-file -Dfile=my-model-1.2.1.jar -DgroupId=com.cyberaka.my.package -DartifactId=my-model -Dversion=1.2.1 -Dpackaging=jar -DgeneratePom=true

This duly added the local jar file under appropriate group id and artifact id inside my maven repository and I was able to refer to this dependency through my project’s pom.

 

One thought on “Maven: Installing / adding local jar into your local maven repository

  1. Pingback: Maven: Installing / adding local jar into your local maven repository | Thoughts of Abhinav Anand | Maven

Leave a Reply

Your email address will not be published. Required fields are marked *