小牛的技术博客

从一只小牛做起的技术员

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

maven 下载包冲突问题

java开发需要调用apache phoenix接口,配置pom.xml文件,内容如下:

<repositories>
        <repository>
            <id>apache release</id>
            <url>https://repository.apache.org/content/repositories/releases/</url>
        </repository>
    </repositories>
    
    <dependencies>
        <dependency>
            <groupId>org.apache.phoenix</groupId>
            <artifactId>phoenix-core</artifactId>
            <version>4.5.2-HBase-1.0</version>
        </dependency>
    </dependencies>

 

下载完成之后,出现错误:

Multiple annotations found at this line:
    - ArtifactTransferException: Failure to transfer org.apache.hadoop:hadoop-common:jar:2.5.1
     from https://repository.apache.org/content/repositories/releases/ was cached in the local repository,
     resolution will not be reattempted until the update interval of apache release has elapsed or updates
     are forced. Original error: Could not transfer artifact org.apache.hadoop:hadoop-common:jar:2.5.1
     from/to apache release (https://repository.apache.org/content/repositories/releases/): No response
     received after 60000
    - ArtifactTransferException: Failure to transfer org.iq80.snappy:snappy:jar:0.3 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.iq80.snappy:snappy:jar:0.3 from/to central (http://
     repo.maven.apache.org/maven2): The operation was cancelled.
    - ArtifactTransferException: Failure to transfer net.sourceforge.findbugs:annotations:jar:1.3.2
     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 net.sourceforge.findbugs:annotations:jar:1.3.2 from/to central (http://
     repo.maven.apache.org/maven2): The operation was cancelled.
    - Missing artifact org.iq80.snappy:snappy:jar:0.3
    - Missing artifact org.apache.hadoop:hadoop-common:jar:2.5.1
    - ArtifactTransferException: Failure to transfer net.sourceforge.findbugs:annotations:jar:1.3.2
     from https://repository.apache.org/content/repositories/snapshots/ was cached in the local
     repository, resolution will not be reattempted until the update interval of apache snapshot has
     elapsed or updates are forced. Original error: Could not transfer artifact
     net.sourceforge.findbugs:annotations:jar:1.3.2 from/to apache snapshot (https://
     repository.apache.org/content/repositories/snapshots/): The operation was cancelled.
    - ArtifactTransferException: Failure to transfer org.iq80.snappy:snappy:jar:0.3 from https://
     oss.sonatype.org/content/repositories/snapshots was cached in the local repository, resolution will
     not be reattempted until the update interval of sonatype-nexus-snapshots has elapsed or updates
     are forced. Original error: Could not transfer artifact org.iq80.snappy:snappy:jar:0.3 from/to sonatype-
     nexus-snapshots (https://oss.sonatype.org/content/repositories/snapshots): The operation was
     cancelled.
    - Missing artifact net.sourceforge.findbugs:annotations:jar:1.3.2
    - ArtifactTransferException: Failure to transfer org.apache.hadoop:hadoop-common:jar:2.5.1
     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.hadoop:hadoop-common:jar:2.5.1 from/to central (http://
     repo.maven.apache.org/maven2): No response received after 60000
    - ArtifactTransferException: Failure to transfer net.sourceforge.findbugs:annotations:jar:1.3.2
     from http://conjars.org/repo was cached in the local repository, resolution will not be reattempted
     until the update interval of conjars.org has elapsed or updates are forced. Original error: Could not
     transfer artifact net.sourceforge.findbugs:annotations:jar:1.3.2 from/to conjars.org (http://conjars.org/
     repo): The operation was cancelled.
    - ArtifactTransferException: Failure to transfer org.iq80.snappy:snappy:jar:0.3 from https://
     repository.apache.org/content/repositories/snapshots/ was cached in the local repository, resolution
     will not be reattempted until the update interval of apache snapshot has elapsed or updates are
     forced. Original error: Could not transfer artifact org.iq80.snappy:snappy:jar:0.3 from/to apache
     snapshot (https://repository.apache.org/content/repositories/snapshots/): The operation was
     cancelled.
    - ArtifactTransferException: Failure to transfer net.sourceforge.findbugs:annotations:jar:1.3.2
     from https://oss.sonatype.org/content/repositories/snapshots was cached in the local repository,
     resolution will not be reattempted until the update interval of sonatype-nexus-snapshots has elapsed
     or updates are forced. Original error: Could not transfer artifact
     net.sourceforge.findbugs:annotations:jar:1.3.2 from/to sonatype-nexus-snapshots (https://
     oss.sonatype.org/content/repositories/snapshots): The operation was cancelled.
    - ArtifactTransferException: Failure to transfer org.iq80.snappy:snappy:jar:0.3 from http://
     conjars.org/repo was cached in the local repository, resolution will not be reattempted until the
     update interval of conjars.org has elapsed or updates are forced. Original error: Could not transfer
     artifact org.iq80.snappy:snappy:jar:0.3 from/to conjars.org (http://conjars.org/repo): The operation
     was cancelled.

 

 

解决方法:

因为依赖冲突,要下载的包在本地m2文件里已经存在,所以将本地资源删除,重新update即可。

从错误报告中可以看到,主要冲突的包有三个:

org.apache.hadoop:hadoop-common:jar:2.5.1

org.iq80.snappy:snappy:jar:0.3

net.sourceforge.findbugs:annotations:jar:1.3.2

 

posted on 2016-11-09 16:38  niubingru  阅读(766)  评论(0)    收藏  举报