在使用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
https://www.oracle.com/technetwork/database/enterprise-edition/jdbc-112010-090769.html
oracle驱动先去官网下载,下载下来后,需要安装到maven本地仓库,然后再pom中添加依赖.
1下载oracle驱动包
ojdbc6-11.2.0.3.jar
2命令行安装到maven仓库
mvn install:install-file -DgroupId=com.oracle -DartifactId=ojdbc6 -Dversion=11.2.0.3.0 -Dpackaging=jar -Dfile=E:\oracle-lib\ojdbc6-11.2.0.3.jar
3添加依赖
<dependency><groupId>com.oracle</groupId><artifactId>ojdbc6</artifactId><version>11.2.0.3</version></dependency>
然后就可以用了.