前些天发现了一个巨牛的人工智能学习网站,通俗易懂,风趣幽默,忍不住分享一下给大家。点击跳转到教程。
Could not resolve dependencies for project com.foreveross:gaei-syncpm:jar:0.0.1-SNAPSHOT:
Failure to find com.oracle.jdbc:ojdbc7:jar:11.2.0.4 in https://repo.maven.apache.org/maven2 was cached in the local repository,
resolution will not be reattempted until the update interval of central has elapsed or updates are forced
大体意思是jar包没有下载完整,不过也要分两种情况:
1. 可能就是本地没有下载完整,这里的原因可能第一次下载由于网络原因不成功,之后maven也没在尝试。
将本地Maven仓库中已下载的相关依赖 Jar 删掉,从新 build update 工程即可!
引用
This is often a false positive. Imagine you have a connection issue lasting only 5 seconds when Maven 3 tries to download a dependency, it will mark this dependency as unavailable for a delay. And thus will prevent you from replaying the build command even if the network issue is fixed.
Just run the command with the -U option. Even if its description applies to snapshots, it seems to also fix the error if it occurred on a release.
Example: mvn -U clean package
This is often a false positive. Imagine you have a connection issue lasting only 5 seconds when Maven 3 tries to download a dependency, it will mark this dependency as unavailable for a delay. And thus will prevent you from replaying the build command even if the network issue is fixed.
Just run the command with the -U option. Even if its description applies to snapshots, it seems to also fix the error if it occurred on a release.
Example: mvn -U clean package
此外,我们可以在setting.xml中增加updatePolicy策略
setting.xml指导
http://maven.apache.org/ref/3.3.1/maven-settings/settings.html
在setting.xml的schema中有这样一个描述
schema
http://maven.apache.org/xsd/settings-1.0.0.xsd
2. 另一种情况就是我们依赖的nexus也没有下载完整,这时候可能是配置的中央仓库代理仓库根本就不存在此jar,或者需要在第三方仓库中才能找到,此时我们应该尝试检查和配置代理仓库。
转自:https://blog.csdn.net/vtopqx/article/details/73457539
https://blog.csdn.net/shierqu/article/details/44787025