具体报错显示:
因为项目连接的是本地仓库,所以我是直接将同事的maven仓库直接复制到我的电脑上。后来发现,项目本地运行时并没有报错,可是clean编译项目的时候也没有报错,package打包的时候,项目报错。如下:
但是我的仓库时存在这个包的,后来经过,各种尝试,发现此种方法可行。
Failure to find com.oracle:ojdbc6:pom:11.2.0.2.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 nexus has elapsed or updates are forced
解决方案
进入cmd命令行,如果你没有相关包的话,请先下载相关包,我是仓库中本来就已经有包。下载包地址: 11.2.0.1.0版本下载
然后执行以下代码:
mvn install:install-file -Dfile=C:\Users\duke\Desktop\11.2.0.2.0\ojdbc6-11.2.0.2.0.jar
-DgroupId=com.oracle -DartifactId=ojdbc6 -Dversion=11.2.0.2.0 -Dpackaging=jar
上图中:C:\Users\duke\Desktop\11.2.0.2.0\ojdbc6-11.2.0.2.0.jar,这个路径时你存放jar包的路径。