cai772088996 2016-06-27 12:23 采纳率: 100%
浏览 15235

maven项目编译总是报错DependencyResolutionException

项目代码不报错,照网上的搜索结果,分别用了两种方式编译该maven项目

第一种:命令行,提示success

图片说明

第二种:run as--》maven bulid--》输入compile

图片说明

图片说明

这个错的详细信息是:

[ERROR] Failed to execute goal on project SSM01: Could not resolve dependencies for project com.cailikun:SSM01:war:0.0.1-SNAPSHOT: Failed to collect dependencies at mysql:mysql-connector-java:jar:6.0.3: Failed to read artifact descriptor for mysql:mysql-connector-java:jar:6.0.3: Could not transfer artifact mysql:mysql-connector-java:pom:6.0.3 from/to central (https://repo.maven.apache.org/maven2): repo.maven.apache.org: Unknown host repo.maven.apache.org -> [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

这个异常信息里一直在提mysql-connector-java这个jar包是几个意思?我在pom.xml里换把这个jar包换个版本也不行

  • 写回答

3条回答 默认 最新

  • 一本郑经 2016-06-27 12:41
    关注

    你本地库,那个jar包缺失吧!,网络不好时,maven经常jar包缺失

    评论

报告相同问题?

悬赏问题

  • ¥15 drone 推送镜像时候 purge: true 推送完毕后没有删除对应的镜像,手动拷贝到服务器执行结果正确在样才能让指令自动执行成功删除对应镜像,如何解决?
  • ¥15 求daily translation(DT)偏差订正方法的代码
  • ¥15 js调用html页面需要隐藏某个按钮
  • ¥15 ads仿真结果在圆图上是怎么读数的
  • ¥20 Cotex M3的调试和程序执行方式是什么样的?
  • ¥20 java项目连接sqlserver时报ssl相关错误
  • ¥15 一道python难题3
  • ¥15 牛顿斯科特系数表表示
  • ¥15 arduino 步进电机
  • ¥20 程序进入HardFault_Handler