天天看点

新建maven项目报错:Failure to transfer org.codehaus.plexus:plexus-archiver:pom:2.1

今天新建了一个maven项目,出现如下错误:

Failure to transfer org.codehaus.plexus:plexus-archiver:pom:2.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 
org.codehaus.plexus:plexus-archiver:pom:2.1 from/to central 
(https://repo.maven.apache.org/maven2): repo.maven.apache.org
           

试了许多办法,最后发现一个很不错的处理方法记录下来:

在maven安装目录下的 maven--》conf 修改settings.xml,找到<mirrors>节点,在里面添加:

alimaven
     
    
     
      central
     
    
     
      aliyun maven
     
    
     
      http://maven.aliyun.com/nexus/content/repositories/central/
     

    
           

即在Maven设置添加阿里云仓库, 然后重启ecplise,更新项目,问题解决!!!