具體報錯信息如下:
Failure to transfer com.thoughtworks.xstream:xstream-parent:pom:1.3.1 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 com.thoughtworks.xstream:xstream-parent:pom:1.3.1 from/to central (https://repo.maven.apache.org/maven2): The operation was cancelled.
這里沒有弄清楚具體原因是什么,在Maven的配置文件settings.xml中,配置了鏡像后問題得以解決,配置方式如下:
在Eclipse中正確配置Maven信息,在其中找到User Settings中配置的settings.xml位置

在settings.xml中添加如下配置

<mirror>
<id>alimaven</id>
<name>aliyun maven</name>
<url>http://maven.aliyun.com/nexus/content/groups/public/</url>
<mirrorOf>central</mirrorOf>
</mirror>
然后在Eclipse中右擊項目——>Maven——>Update Project 即可。
