解决“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.jar

你可能感兴趣的:(java)