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

问题,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

Failed to execute goal on project X: Could not resolve dependencies for project X: Failure to find Y_第1张图片

或者

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

你可能感兴趣的:(Maven)