Maven com.sun.jdmk:jmxtools:jar 下载不下来

昨天用了主管写的一个Spring mvc 框架。用maven进行打包编译时, 一直没有通过。报下面的错:

?
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
[ERROR] Failed to execute goal on project logconsumer: Could not resolve depende
ncies for project com.sunchangming:logconsumer:jar: 0.0 . 1 -SNAPSHOT: The following
artifacts could not be resolved: javax.jms:jms:jar: 1.1 , com.sun.jdmk:jmxtools:j
ar: 1.2 . 1 , com.sun.jmx:jmxri:jar: 1.2 . 1 : Could not transfer artifact javax.jms:jms
:jar: 1.1 from/to java.net (https: //maven-repository.dev.java.net/nonav/repositor
y): No connector available to access repository java.net (https: //maven-reposito
ry.dev.java.net/nonav/repository) of type legacy using the available factories W
agonRepositoryConnectorFactory -> [Help 1 ]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit
ch.
[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 rea
d the following articles:


因为公司的网络一直不怎么稳定。猜想是连不上maven的服务器,于是ping 那机器。

?
1
2
ping maven-repository.dev.java.net
Ping 请求找不到主机 maven-repository.dev.java.net。请检查该名称,然后重试。
那就是没有办法了。只能看看是哪个jar依赖这几个文件了。


去度娘那里问了一下,才知道是log4j.

引用:http://www.udpwork.com/item/8061.html

?
1
2
3
4
5
6
7
原来是这样,在log4j 1.2.15版本中,引用了这样一个repos
< repository >
           < id >java.net</ id >
           < url >https://maven-repository.dev.java.net/nonav/repository</ url >
           < layout >legacy</ layout >
     </ repository >
要从它这里面下载jms。

解决方法是:

将pom.xml里的log4j的版本修改为:1.2.16或者1.2.17

原文地址:http://my.oschina.net/claireliu/blog/97448

  • 0
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值