解决“Failure to find com.oracle:ojdbc6:jar”,手动安装ojdbc的jar包到maven私仓
生活随笔
收集整理的這篇文章主要介紹了
解决“Failure to find com.oracle:ojdbc6:jar”,手动安装ojdbc的jar包到maven私仓
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
在使用mvn進行編譯的時候,遇到如下錯誤:
Could not resolve dependencies for project com.bairong.platform:auth:jar:3.0: Failure to find com.oracle:ojdbc6:jar:11.2.0.1.0 in http://maven.aliyun.com /nexus/content/groups/public/ was cached in the local repository, resolution will not be reattempted until the update interval of alimaven has elapsed or updates are forced原因是由于版權原因,ojdbc的依賴maven倉庫中沒有,因此需要我們手動下載該jar包并安裝到私服。
下載ojdbc6.jar之后,在jar包當前路徑執行如下命令即可
mvn install:install-file -DgroupId=com.oracle -DartifactId=ojdbc6 -Dpackaging=jar -Dversion=11.2.0.1.0 -Dfile=ojdbc6.jarhttps://www.oracle.com/technetwork/database/enterprise-edition/jdbc-112010-090769.html
oracle驅動先去官網下載,下載下來后,需要安裝到maven本地倉庫,然后再pom中添加依賴.
1下載oracle驅動包
ojdbc6-11.2.0.3.jar
2命令行安裝到maven倉庫
3添加依賴
<dependency><groupId>com.oracle</groupId><artifactId>ojdbc6</artifactId><version>11.2.0.3</version></dependency>然后就可以用了.
總結
以上是生活随笔為你收集整理的解决“Failure to find com.oracle:ojdbc6:jar”,手动安装ojdbc的jar包到maven私仓的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: VSFTPD Centos 7.6 _配
- 下一篇: 通用mapper 如何处理多表条件查询通