pom.xml中报错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


具体报错信息如下:

  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 即可。

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM