我不明白以下错误。我已在Artifactory上部署了site-plugin:3.3但收到此错误消息。我不明白这意味着什么,我对此感到困惑。由于我测试了与repo的连接,Artifactory服务器可以通过代理访问Maven repo1。
[ERROR] Plugin org.apache.maven.plugins:maven-site-plugin:3.3 or one of its dependencies could not be resolved:
Failure to find org.apache.maven.plugins:maven-site-plugin:jar:3.3 in http://lab.computer.ip:8070/artifactory/remote-repos was cached in the local repository,
resolution will not be reattempted until the update interval of remote-repos has elapsed or updates are forced -> [Help 1]
答案 0 :(得分:0)
如果您在中途或其他地方杀死了一个构建,那么您的本地存储库可能会被软化。尝试从本地.m2文件夹中删除该目录。
答案 1 :(得分:0)
错误消息表示Maven未能在Artifactory(remote-repos repoitory)中找到所请求的插件(maven-site-plugin:3.3)并缓存此失败响应。 Maven将不会尝试从Artifactory下载插件,直到远程回购的更新间隔将过去。
Maven有updatePolicy这是下载更新的频率 - 它可以是“始终”,“每日”(默认),“间隔:XXX”(以分钟为单位)或“从不”(仅当它不是在当地存在。)
您应首先检查此插件是否可通过Artifactory获得。通常,这应该可以从配置的远程存储库之一(JCenter,repo1等)获得。
由于您要从远程存储库进行解析,因此您应该尝试查看插件是否在{{3}处可用}。如果没有,请使用以下内容尝试http://lab.computer.ip:8070/artifactory/remote-repos/org/apache/maven/plugins/maven-site-plugin/3.3/maven-site-plugin-3.3.jar请求:tracing
要强制Maven再次尝试下载插件,您可以使用 -U 选项运行它,也可以删除本地reposioty中相应的下载工件目录。
答案 2 :(得分:0)
This文章救了我
对于Unix用户
- find~ / .m2 -name“* .lastUpdated”-exec grep -q“无法转移” {} \; -print -exec rm {} \;
- 右键单击您的项目,然后选择“更新依赖关系”
醇>适用于Windows
- CD(更改目录)到.m2 \ repository
- 在(* .lastUpdated)do del%i
中为/ r%i执行此命令- 右键单击您的项目,然后选择“更新依赖关系”
醇>