Tag Archives: pom.xml

How to add 3rd Party/Custom/External Jars to Maven Project?


In below steps will show about to add 3rd party/custom/external Jars in local repository for use in our project builds because these jars doesn’t exist in Maven public repository and required to build project.

Pre-Requisite

To add these jars we can use below command to load in local repository (.m2/repository)

mvn install:install-file -Dfile= -DgroupId=
-DartifactId= -Dversion= -Dpackaging=

Example : Oracle is 3rd party and it’s jars are available in maven public repository. We can use below command to store in maven local repository and make entry in pom.xml to use it.

mvn install:install-file -Dfile=C:\\Workspace\\ojdbc6.jar -DgroupId=com.oracle -DartifactId=ojdbc6 -Dversion=11.2.0 -Dpackaging=jar

pom.xml entry for above oracle jar


	com.oracle
	ojdbc6
	11.2.0