How to use Oracle JDBC driver in Gradle project

前端 未结 7 1185
醉话见心
醉话见心 2020-12-15 19:09

I\'m new with Gradle projects and I have one question. I\'ve searched in Internet but I couldn\'t find what I need or maybe I couldn\'t know how to search it. First I\'m goi

相关标签:
7条回答
  • 2020-12-15 19:49

    other than mavenCentral use local maven repository as well for our dependencies. The reason for using the local maven repository is because the jdbc driver from Oracle is not publicly accessible. We will have to download the driver from Oracle and install it in our local maven repo.

    repositories {
        mavenLocal()
    }
    
    dependencies {
        compile ("com.oracle:ojdbc6:12.2.0.1")
    }
    
    mvn install:install-file -Dfile="\ojdbc6.jar" -DgroupId="com.oracle" -DartifactId="ojdbc6" -Dversion="12.2.0.1" -Dpackaging="jar" -DgeneratePom="true"
    

    Oracle Site for driver:

    https://www.oracle.com/technetwork/database/enterprise-edition/jdbc-112010-090769.html

    Maven site:

    https://maven.apache.org/download.cgi

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