maven log4j.jar问题

Maven使用log4j可能会有协议上的问题

  • 如果log4j的版本在1.2.14以上,则会出现下面的错误:
<!-- ws:start:WikiTextCodeRule:0: &lt;pre class=&quot;text&quot;&gt;Missing artifact javax.jms:jms:jar:1.1:compile&lt;br/&gt;Missing artifact com.sun.jdmk:jmxtools:jar:1.2.1:compile&lt;br/&gt;Missing artifact com.sun.jmx:jmxri:jar:1.2.1:compile&lt;/pre&gt; -->
Missing artifact javax.jms:jms:jar:1.1:compile
Missing artifact com.sun.jdmk:jmxtools:jar:1.2.1:compile
Missing artifact com.sun.jmx:jmxri:jar:1.2.1:compile
<!-- ws:end:WikiTextCodeRule:0 -->
  • 原因是log4j在1.2.15及以上版本更换了协议,与jms冲突。解决办法有两种:一是使用1.2.14版本,二是手动下载jms.jar,安装到maven本地仓库中去

猜你喜欢

转载自cczakai.iteye.com/blog/1445574