找到了一个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]
高洛峰2017-04-17 17:44:12
因為Oracle使用的授權協議,Maven的中央庫不被允許託管其artifacts,你可以本地安裝Oracle資料庫,然後將安裝目錄中的JDBC jar包install到本地的Maven倉庫,Maven命令:#🎜 🎜#
mvn install:install-file -Dfile={Path/to/your/ojdbc.jar} -DgroupId=com.oracle
-DartifactId=ojdbc6 -Dversion=11.2.0 -Dpackaging=jar
上面的Maven指令會把jar檔安裝到本地的Maven倉庫,DgroupId和DartifactId參數分別指定安裝時的groupId和artifactId,可以隨便指定,但肯定最好是和jar包的版本盡量一致的,避免以後混淆。 如果不想本地安裝Oracle資料庫,也可以在Oracle的官網直接下載想安裝的JDBC驅動版本(Google 搜尋「jdbc oracle」),以下是我找到的:
http://www. oracle.com/technetwork/database/features/jdbc/index-091264.html
下載之後,同樣執行上面的Maven指令。
http://www.oracle.com/technetwork/database/enterprise-edition/jdbc-faq-090281. html
https://blogs.oracle.com/dev2dev/entry/oracle_maven_repository_instructions_for