pom.xml中报错Failure to transfer com.thoughtworks.xstream:xstream-parent:pom:1.3.1 from https://repo...

具体报错信息以下:apache

  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

 

 这里没有弄清楚具体缘由是什么,在Maven的配置文件settings.xml中,配置了镜像后问题得以解决,配置方式以下:url

  在Eclipse中正确配置Maven信息,在其中找到User Settings中配置的settings.xml位置spa

  

  在settings.xml中添加以下配置3d

  

  

<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 便可。code