The POM for oracle:ojdbc6:jar:11.2.0.3 is missing, no dependency information available

The POM for oracle:ojdbc6:jar:11.2.0.3 is missing, no dependency information available

项目编译时报错:

[ERROR] Failed to execute goal on project oraclereader: Could not resolve dependencies for project xxx:
 Failure to find oracle:ojdbc6:jar:11.2.0.3 in http://mirrors.cloud.tencent.com/nexus/repository/maven-public/ was cached in the local repository, 
 resolution will not be reattempted until the update interval of nexus-tencentyun has elapsed or updates are forced -> [Help 1]

原因:oracle的ojdbc6.jar在maven的中央仓库中没有这个资源,只能通过配置本地库才能加载到项目中去。

解决方法:将jar包安装到自己的本地库,切换到下载的jar包目录,执行如下命令

mvn install:install-file -DgroupId=com.oracle -DartifactId=ojdbc6 -Dversion=11.2.0.3 -Dpackaging=jar -Dfile=ojdbc6-11.2.0.3.jar
  • -DgroupId :pom文件里groupId

  • -DartifactId:pom文件里artifactId

  • -Dversion:pom文件里version

  • -Dfile:jar包路径

The POM for oracle:ojdbc6:jar:11.2.0.3 is missing, no dependency information available_第1张图片

注:如果试了还不行,那就确认pom文件里groupId、artifactId和version与你执行安装命令时是否一样。

        <dependency>
            <groupId>com.oraclegroupId>
            <artifactId>ojdbc6artifactId>
            <version>11.2.0.3version>
        dependency>

你可能感兴趣的:(Oracle,Java,oracle,数据库,ojdbc6)