zoukankan      html  css  js  c++  java
  • maven+eclipse:Failure to transfer

    配置好了maven环境,然后在eclipse中创建maven项目,添加依赖:

    <dependency>
      <groupId>commons-logging</groupId>
      <artifactId>commons-logging</artifactId>
      <version>1.1.1</version>
     </dependency>

    pom文件报错:

    Failure to transfer commons-logging:commons-logging:jar:1.1.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 commons-logging:commons-logging:jar:1.1.1 from/
     to central (https://repo.maven.apache.org/maven2): The operation was cancelled. org.eclipse.aether.transfer.ArtifactTransferException: Failure to transfer commons-
     logging:commons-logging:jar:1.1.1 from https://repo.maven.apache.org/maven2.........

    问度娘了半天,没找到解决办法,最后看到有个人说common包是maven类库里的基本包,一开始就下载下来的,我就去看了下,发现本地maven类库中确实已经有了common-logging目录,在其中找到1.1.1版本的目录,发现commons-logging-1.1.1.jar.lastUpdated,正常jar包后面有个.lastUpdated后缀,我从官网下了个commons-logging-1.1.1.jar,替换了commons-logging-1.1.1.jar.lastUpdated,然后在eclipse中,选中项目-右击-maven-update project,ok 报错消失。

    以后再遇到类似问题,先查看本地类库中有没有.lastUpdated后缀文件,记录一下,以后可以提醒自己。

  • 相关阅读:
    jQuery选择器
    CSS选择器性能分析
    JavaScript 之垃圾回收和内存管理
    六个字符,带你领略JavaScript (js的艺术编写)
    Redis(1) 简介以及linux环境下的安装
    Teamviewer被商业检测处理办法
    Linux 分配/home的磁盘空间给根目录
    vmware虚拟机安装Oracle Linux 出现Unable to open the image
    Vim编辑器常用命令
    Xshell连接虚拟机中的Ubuntu
  • 原文地址:https://www.cnblogs.com/xuyy/p/4672908.html
Copyright © 2011-2022 走看看