因为maven下载依赖jar包时,特别慢,所以取消了下载过程,再次打开eclipse时,maven的pom.xml文件报错如下:
ArtifactTransferException: Failure to transfer xom:xom:jar:1.2.5
from http://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.
Original error: Could not transfer artifact xom:xom:jar:1.2.5
from/to central (http://repo.maven.apache.org/maven2): The operation was cancelled.
解决办法,上面也提到了:updates are forced,强制刷新maven的依赖。
如下图所示:
右键点击项目,然后
然后勾上 Forse update ....,然后maven就会重新自动下载依赖jar包了。