Find Oracle JDBC driver in Maven repository

前端 未结 22 1387
你的背包
你的背包 2020-11-22 09:28

I want to add the oracle jdbc driver to my project as dependency (runtime scope) - ojdbc14. In MVNrepository site the dependency to put in the POM is:



        
相关标签:
22条回答
  • 2020-11-22 10:21

    You can use Nexus to manage 3rd party dependencies as well as dependencies in standard maven repositories.

    0 讨论(0)
  • 2020-11-22 10:24

    Oracle is now exposing a maven repository at maven.oracle.com However you need to be authenticated.

    See https://blogs.oracle.com/WebLogicServer/entry/weblogic_server_and_the_oracle

    According to the comments in the blog post the ojdbc driver should be available at the following coordinates:

    <groupId>com.oracle.weblogic</groupId>
     <artifactId>ojdbc7</artifactId>
     <version>12.1.3-0-0</version>
     <packaging>jar</packaging>
    
    0 讨论(0)
  • 2020-11-22 10:25

    The Oracle JDBC Driver is now available in the Oracle Maven Repository (not in Central).

    <dependency>
        <groupId>com.oracle.jdbc</groupId>
        <artifactId>ojdbc7</artifactId>
        <version>12.1.0.2</version>
    </dependency>
    

    The Oracle Maven Repository requires a user registration. Instructions can be found in:

    https://blogs.oracle.com/dev2dev/get-oracle-jdbc-drivers-and-ucp-from-oracle-maven-repository-without-ides

    Update 2019-10-03

    I noticed Spring Boot is now using the Oracle JDBC Driver from Maven Central.

    <dependency>
        <groupId>com.oracle.ojdbc</groupId>
        <artifactId>ojdbc10</artifactId>
        <version>19.3.0.0</version>
    </dependency>
    

    For Gradle users, use:

    implementation 'com.oracle.ojdbc:ojdbc10:19.3.0.0'
    

    There is no need for user registration.

    Update 2020-03-02

    Oracle is now publishing the drivers under the com.oracle.database group id. See Anthony Accioly answer for more information. Thanks Anthony.

    Oracle JDBC Driver compatible with JDK6, JDK7, and JDK8

    <dependency>
      <groupId>com.oracle.database.jdbc</groupId>
      <artifactId>ojdbc6</artifactId>
      <version>11.2.0.4</version>
    </dependency>
    

    Oracle JDBC Driver compatible with JDK8, JDK9, and JDK11

    <dependency>
      <groupId>com.oracle.database.jdbc</groupId>
      <artifactId>ojdbc8</artifactId>
      <version>19.3.0.0</version>
    </dependency>
    

    Oracle JDBC Driver compatible with JDK10 and JDK11

    <dependency>
      <groupId>com.oracle.database.jdbc</groupId>
      <artifactId>ojdbc10</artifactId>
      <version>19.3.0.0</version>
    </dependency>
    
    0 讨论(0)
  • 2020-11-22 10:26

    You can find a Github simple sample project for use a Oracle JDBC Driver on Maven Project here.

    You can find all explication for your continous integration + a sample and run on Travis-CI.

    DEMO

    0 讨论(0)
提交回复
热议问题