zoukankan      html  css  js  c++  java
  • Maven问题:Failure to transfer org.apache.maven

    Maven报错:Failure to transfer org.apache.maven

    在创建Maven项目时,经常会在pom.xml的第一行处报错,提示信息如下:

    Failure to transfer org.apache.maven:maven-surefire-plugin:jar: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 org.apache.maven:maven- 
    archiver:jar:2.5 from/to central (http://repo.maven.apache.org/maven2): The 
    operation was cancelled.

    其主要的原因是因为maven的plugin并未下载到本地 
    解决问题的办法很简单:

    步骤一:你可以到本地库中搜索“.lastUpdated”结尾的文件并且删除

    1.进入dos窗口

    2.进入本地仓库文件夹下执行命令: del *.lastUpdated  /s /f /q

     

    步骤二: 回到项目中,在项目右键点击project -> Maven -> Update Dependencies(Update Project…)更新项目,这时候应该就没有错了。

  • 相关阅读:
    MySQL、Redis 和 MongoDB 的优缺点
    解决数据库高并发
    数据库事务
    Mysql 数据库存储的原理?
    CSRF
    MVC模型和MVT模型
    AJAX
    正则表达式-re模块
    ddt-数据驱动测试
    python-时间格式化
  • 原文地址:https://www.cnblogs.com/shianliang/p/9335180.html
Copyright © 2011-2022 走看看