我遇到了下一个问题:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:1.3:run (default) on project mdw: Execution default of goal org.apache.maven.plugins:maven-antrun-plugin:1.3:run failed: Plugin org.apache.maven.plugins:maven-antrun-plugin:1.3 or one of its dependencies could not be resolved: Failure to find com.oracle:ojdbc7:jar:12.1.0.2 in **Here nexus url** was cached in the local repository, resolution will not be reattempted until the update interval of eict-plugins has elapsed or updates are forced -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:1.3:run (default) on project mdw: Execution default of goal org.apache.maven.plugins:maven-antrun-plugin:1.3:run failed: Plugin org.apache.maven.plugins:maven-antrun-plugin:1.3 or one of its dependencies could not be resolved: Failure to find com.oracle:ojdbc7:jar:12.1.0.2 in **Here nexus url** was cached in the local repository, resolution will not be reattempted until the update interval of eict-plugins has elapsed or updates are forced
当maven建立我的项目时。
如何解决,有什么建议吗?
答案 0 :(得分:0)
我试过看,找不到oracle版本的ojdbc7。你可以试试下面的内容,看看这是否有帮助。
<dependency>
<groupId>com.github.noraui</groupId>
<artifactId>ojdbc7</artifactId>
<version>12.1.0.2</version>
</dependency>
答案 1 :(得分:0)
这个人工制品仅在Oracle资源库中可用,为了让maven下载它你必须在你的pom.xml中声明Oracle资源库:
<dependencies>
.............
<dependecy>
<groupId>com.oracle.jdbc</groupId>
<artifactId>ojdbc8</artifactId>
<version>12.2.0.1</version>
<dependency>
.............
</dependencies>
<repositories>
<repository>
<id>maven.oracle.com</id>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
<url>https://maven.oracle.com</url>
<layout>default</layout>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>maven.oracle.com</id>
<url>https://maven.oracle.com</url>
</pluginRepository>
</pluginRepositories>
您必须拥有一个Oracle帐户才能对下载进行身份验证,并将其添加到settings.xml文件中:
<server>
<id>maven.oracle.com</id>
<username>your_oracle_username</username>
<password>your_oracle_password</password>
<configuration>
<basicAuthScope>
<host>ANY</host>
<port>ANY</port>
<realm>OAM 11g</realm>
</basicAuthScope>
<httpConfiguration>
<all>
<params>
<property>
<name>http.protocol.allow-circular-redirects</name>
<value>%b,true</value>
</property>
</params>
</all>
</httpConfiguration>
</configuration>