开发者社区> 问答> 正文

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

 导入一个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包,加入到仓库中)



展开
收起
爱吃鱼的程序员 2020-06-10 14:22:54 829 0
1 条回答
写回答
取消 提交回答
  • https://developer.aliyun.com/profile/5yerqm5bn5yqg?spm=a2c6h.12873639.0.0.6eae304abcjaIB

    <spanstyle="font-size:13.3333px;line-height:13.3333px;">通过error可以看出是从maven仓库中找到不上面的几个jar包。初步认为应该是pom文件中对应jar的名称有误。最好能把pom文件中对应的jar配置贴出来看看。回复<aclass='referer'target='_blank'>@henry_huazi:抱歉,回复晚了。不知道现在有没有解决?从贴出来的pom文件中可以看出来spring-beans和mysql驱动这两个dependency还是有问题没有解决的,不知道是什么错误呢?贴出来了,就这三个包。帮忙看看

    2020-06-10 14:23:10
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
低代码开发师(初级)实战教程 立即下载
冬季实战营第三期:MySQL数据库进阶实战 立即下载
阿里巴巴DevOps 最佳实践手册 立即下载

相关镜像