导入maven项目,jar包下载不成功的问题

henry_huazi 发布于 2016/02/15 16:53
阅读 3K+
收藏 0

 导入一个maven项目,有3个包怎么都下载不下来 --项目出现感叹号,pom.xml 文件报错。 

  试了update project 几次无果。

  又试了 网上说的 根目录下 执行:mvn dependency:copy-dependencies  命令

  报错:

[INFO] Scanning for projects...
[INFO] 
[INFO] Using the builder org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder with a thread count of 1
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building spring-shiro-training Maven Webapp 1.0
[INFO] ------------------------------------------------------------------------
[INFO] Downloading: http://repo.maven.apache.org/maven2/org/mybatis/mybatis/3.2.7/mybatis-3.2.7.jar
[INFO] Downloading: http://repo.maven.apache.org/maven2/org/springframework/spring-beans/3.2.9.RELEASE/spring-beans-3.2.9.RELEASE.jar
[INFO] Downloading: http://repo.maven.apache.org/maven2/mysql/mysql-connector-java/5.1.22/mysql-connector-java-5.1.22.jar
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 22.412 s
[INFO] Finished at: 2016-02-15T16:40:12+08:00
[INFO] Final Memory: 9M/154M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project spring-shiro-training: Could not resolve dependencies for project com.wangzhixuan:spring-shiro-training:war:1.0: The following artifacts could not be resolved: org.springframework:spring-beans🏺3.2.9.RELEASE, org.mybatis:mybatis🏺3.2.7, mysql:mysql-connector-java🏺5.1.22: Could not transfer artifact org.springframework:spring-beans🏺3.2.9.RELEASE from/to central (http://repo.maven.apache.org/maven2): Connect to 125.39.35.137:80 [/125.39.35.137] failed: Connection timed out: connect -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException

查了很久,在网上没有找到相关资料。 大神帮看看是什么问题,怎么解决? (除了自己手动下载jar包,加入到仓库中)



加载中
0
凯旋基诺
凯旋基诺
通过error可以看出是从maven仓库中找到不上面的几个jar包。初步认为应该是pom文件中对应jar的名称有误。最好能把pom文件中对应的jar配置贴出来看看。
凯旋基诺
凯旋基诺
回复 @henry_huazi : 抱歉,回复晚了。不知道现在有没有解决?从贴出来的pom文件中可以看出来spring-beans和mysql驱动这两个dependency还是有问题没有解决的,不知道是什么错误呢?
henry_huazi
henry_huazi
贴出来了,就这三个包 。 帮忙看看
返回顶部
顶部