org.apache.maven.surefire 无法引用或无法下载问题

问题报错:

Failure to transfer org.apache.maven.surefire:surefire:pom:2.10 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.surefire:surefire:pom:2.10 from/to central ( http://repo.maven.apache.org/maven2): java.net.ConnectException:

connection timed out to http://repo.maven.apache.org/maven2/org/apache/maven/surefire/surefire/2.10/surefire-2.10.pom


错误原因:

org.apache.maven.surefire    没有配置    和 http://repo.maven.apache.org/maven2  连接不上的问题


解决方式:

   在pom.xml文件中 注意配置如下内容:

      
           
                org.apache.maven.plugins
                maven-surefire-plugin
                2.7
           

    



   其次 如果还报 connection timed out ,请再setting.xml添加仓储镜像解决,比如使用阿里云的仓储镜像速度非常快,配置如下:

   
      alimaven
      aliyun maven
      http://maven.aliyun.com/nexus/content/groups/public/
      central        
   

 


你可能感兴趣的:(maven)