Could not find artifact com.oracle:oracledriver:pom:11.2.0.2 in nexus-aliyun
Could not find artifact com.oracle:oracledriver:pom:11.2.0.2 in nexus-aliyunIntelliJ IDEA使用Maven导入一些依赖包,在pom.xml中引入oracledriver11.2.0.2版本一直失败,下载不了.jar文件,显示带有.lastUpdated的后缀原因:oracle没有授权给maven,只能手动添加ja
·
Could not find artifact com.oracle:oracledriver:pom:11.2.0.2 in nexus-aliyun
- IntelliJ IDEA使用Maven导入一些依赖包,在pom.xml中引入oracledriver11.2.0.2版本一直失败,下载不了.jar文件,显示带有.lastUpdated的后缀


- 原因:oracle没有授权给maven,只能手动添加jar包
解决方法
- 下载 oracle.jdbc.oracledriver-11.2.0.2.jar 包到本地任意目录下
- 运行cmd,执行命令将jar包手动添加至本地仓库下,看到BUILD SUCCESS表示成功
/*<dependency>
<groupId>com.oracle</groupId>
<artifactId>oracledriver</artifactId>
<version>11.2.0.2</version>
</dependency>
DgroupId对应pom.xml中groupId的名字
DartifactId对应pom.xml中artifactId的名字
Dversion对应pom.xml中version的名字
Dfile对应刚刚下载jar包的绝对路径/*
mvn install:install-file -DgroupId=com.oracle -DartifactId=oracledriver -Dversion=11.2.0.2 -Dpackaging=jar -Dfile=E:\oracledriver-11.2.0.2.jar

-
本地仓库jar包如下

-
oracle jar包的导入都是按照此方法
魔乐社区(Modelers.cn) 是一个中立、公益的人工智能社区,提供人工智能工具、模型、数据的托管、展示与应用协同服务,为人工智能开发及爱好者搭建开放的学习交流平台。社区通过理事会方式运作,由全产业链共同建设、共同运营、共同享有,推动国产AI生态繁荣发展。
更多推荐

所有评论(0)