Find Oracle JDBC driver in Maven repository

前端 未结 22 1389
你的背包
你的背包 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:03

    For dependency

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

    Try

    <repository>
        <id>mvnrepository</id>
        <url>http://nexus.saas.hand-china.com/content/repositories/rdc</url>
    </repository>
    
    0 讨论(0)
  • 2020-11-22 10:04

    Some Oracle Products support publishing maven artifacts to a local repository. The products have a plugin/maven directory which contains descriptions where to find those artifacts and where to store them. There is a Plugin from Oracle which will actually do the upload.

    See: http://docs.oracle.com/middleware/1212/core/MAVEN/config_maven.htm

    One of the products which may ship OJDBC in this way is the WLS, it uses however quite strange coordinates:

    <groupId>com.oracle.weblogic</groupId>
    <artifactId>ojdbc6</artifactId>
    <version>12.1.2-0-0</version>
    
    0 讨论(0)
  • 2020-11-22 10:05

    Up to now, its not possible to use maven repositories. I'm using ivy as dependency management tool, but also use maven2' s ibiblio repositories. And this is working for ivy:

    <dependency org="oracle" name="ojdbc14" rev="10.2.0.2" conf="*->default"/>
    

    Maven2' s dependency could be something like that:

    <dependency> 
        <groupId>oracle</groupId> 
        <artifactId>ojdbc14</artifactId> 
        <version>10.2.0.2</version> 
    </dependency>
    

    Notice that i define http://download.java.net/maven/2/ and http://mirrors.ibiblio.org/pub/mirrors/maven/mule/dependencies/maven2/[organisation]/[module]/[revision]/[artifact]-[revision].[ext] as external maven2 repos on my ivy settings.

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

    Please try below:

    <dependency>
        <groupId>com.oracle.ojdbc</groupId>
        <artifactId>ojdbc8</artifactId>
        <version>19.3.0.0</version>
    </dependency>
    
    0 讨论(0)
  • 2020-11-22 10:06

    SOLVED

    • Please do following settings to resolve the error

    This repository needs to be enable for finding Oracle 10.0.3.0 dependecies (this setting needs to be done in Buildconfig.groovy grails.project.dependency.resolver = "ivy" // or ivy

    Also use following setting for compile time Oracle driver download

    runtime "com.oracle:ojdbc:10.2.0.3.0"

    This should solve your issue for not finding the Oracle driver for grails application


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

    In my case it works for me after adding this below version dependency(10.2.0.4). After adding this version 10.2.0.3.0 it doesn't work due to .jar file not avail in repository path.

    <groupId>com.oracle</groupId>
    <artifactId>ojdbc14</artifactId>
    <version>10.2.0.4</version>
    
    0 讨论(0)
提交回复
热议问题