Monday, October 22, 2012

How to add Oracle JDBC driver in your Maven local repository

I found the below blog very helpfull for this information
 http://www.mkyong.com/maven/how-to-add-oracle-jdbc-driver-in-your-maven-local-repository/

Which in short guides to do following steps in order to add your JDBC driver to your Maven local repository

Run below mvn command

mvn install:install-file -Dfile=D:\app\mkyong\product\11.2.0\dbhome_1\jdbc\lib\ojdbc6.jar  -DgroupId=com.oracle -DartifactId=ojdbc6 -Dversion=11.2.0 -Dpackaging=jar

of course you will have to replace the path to OJDBC jar file with your machine's path. Maven will show you a build success message. After that you will have to add following dependency to your project's pom.xml


  <!-- ORACLE database driver -->
  <dependency>
   <groupId>com.oracle</groupId>
   <artifactId>ojdbc6</artifactId>
   <version>11.2.0</version>
  </dependency>
and there you go. Oracle driver is now installed in maven repository.

  

2 comments:

  1. I used below command to install the documentum dpm_infra jar file in maven

    mvn install:install-file -D file=D:\maven_jar_installer\bpm_infra.jar -D groupId=com.documentum -D artifactId=bpm_infra -D version=6.6.0.045 -D packaging=jar

    and included below in my pom.xml

    < dependency>
    < groupId >com.documentum< /groupId>
    < artifactId>bpm_infra< /artifactId>
    < version>6.6.0.045< /version>
    < /dependency>

    ReplyDelete


  2. mvn install:install-file -D file=mydrive:\certj.jar -D groupId=com.documentum -D artifactId=certj -D version=5.2 -D packaging=jar


    < dependency >
    < groupId >com.documentum< /groupId >
    < artifactId >certj< /artifactId >
    < version >5.2< /version >
    < /dependency >


    mvn install:install-file -D file=mydrive:\dfc.jar -D groupId=com.documentum -D artifactId=dfc -D version=7.1.0020.0120 -D packaging=jar



    < dependency >
    < groupId >com.documentum< /groupId >
    < artifactId >dfc< /artifactId >
    < version >7.1.0020.0120< /version >
    < /dependency >

    ReplyDelete