找到了一个odps jdbc driver库,但是编译时出错,有人知道原因吗?
<dependency>
<groupId>com.oracle</groupId>
<artifactId>ojdbc14</artifactId>
<version>10.2.0.4.0</version>
</dependency>
[ERROR] Failed to execute goal on project xx: Could not resolve dependencies for projectxxx:jar:1.0-SNAPSHOT: Failure to find com.oracle:ojdbc14:jar:10.2.0.4.0 in http://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced -> [Help 1]
[ERROR]
因為Oracle使用的授權協議,Maven的中央庫不被允許託管其artifacts,你可以本地安裝Oracle資料庫,然後將安裝目錄中的JDBC jar包install到本地的Maven倉庫,Maven命令:#🎜 🎜#
上面的Maven指令會把jar檔安裝到本地的Maven倉庫,DgroupId和DartifactId參數分別指定安裝時的groupId和artifactId,可以隨便指定,但肯定最好是和jar包的版本盡量一致的,避免以後混淆。http://www. oracle.com/technetwork/database/features/jdbc/index-091264.html
如果JDBC驅動的版本或其他方面有問題,可以看看官方的FAQ:下載之後,同樣執行上面的Maven指令。
http://www.oracle.com/technetwork/database/enterprise-edition/jdbc-faq-090281. html
最後,直接透過Maven來安裝Oracle JDBC驅動是可以的,但不是從Maven的中央庫(中央庫不提供,因為這是非法的)而是Oracle自己的Maven庫下載,具體步驟可以看這個頁面:https://blogs.oracle.com/dev2dev/entry/oracle_maven_repository_instructions_for
關於Oracle驅動版的問題,找了篇文章,寫得還比較詳細
http://elf8848.iteye.com/blog/811037