Failed to execute goal on project X: Could not resolve dependencies for project X: Failure to find Y

傷城~ 2023-03-13 06:18 343阅读 0赞

问题,maven提示如下错误

Failed to execute goal on project X: Could not resolve dependencies for project X: Failure to find Y in [archiva repository] was cached in the local repository, resolution will not be reattempted until the update interval of internal has elapsed or updates are forced

解决,到artifact所在的目录删除_remote.repositories或者_maven.repositories文件即可

例如:

Failure to find com.taobao.top:taobao-sdk:pom:2.0.3 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

到本地仓库的artifact目录删除上述文件即可(RepositoryPath\com\taobao\top\taobao-sdk\2.0.3

例子

或者

  1. cd ~/.m2
  2. find . -name "_remote.repositories" | xargs rm -rfv
  3. find . -name "_maven.repositories" | xargs rm -rfv

发表评论

表情:
评论列表 (有 0 条评论,343人围观)

还没有评论,来说两句吧...

相关阅读