在Eclipse下新建maven项目,在pom文件中报错,错误如下:
Failure to transfer org.apache.maven:maven-artifact:jar:2.0.6 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. Original error: Could not transfer artifact org.apache.maven:maven-artifact:jar:2.0.6 from/to central (https://
repo.maven.apache.org/maven2): The operation was cancelled.
解决:
(1)在终端中进入对应的文件
(2)在终端中先后输入:
mvn clean
mvn build
mvn install
(3)回到Eclipse项目中,右键项目:Maven->Update project 记得勾选 “Fore Update of Snapshots/Releases”
解决~