取消或者打断maven的更新后pom.xml飘红

问题产生的原因是STS的Maven插件会将此认定了不可更新的依赖组件而再也不去更新它,即使你将它从pom中删除,然后再次加入也是徒劳的,总是提示:Failure to transfer com.google.guava:guava:jar:21.0 from 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

在这里以eclipse为例

第一步右键项目maven去更新

第二步勾选Force Update of Snapshots/Releases 强制更新

这样子问题就解决了

猜你喜欢

转载自www.cnblogs.com/404code/p/10578258.html
今日推荐