maven工程pom添加log4j依赖:
<dependency>
<groupId>log4j</groupId><artifactId>log4j</artifactId>
<version>1.2.15</version>
</dependency>
出现错误:
12-10-29 上午09时08分41秒: Missing artifact javax.jms:jms:jar:1.1:compile
12-10-29 上午09时08分41秒: Missing artifact com.sun.jdmk:jmxtools:jar:1.2.1:compile
12-10-29 上午09时08分41秒: Missing artifact com.sun.jmx:jmxri:jar:1.2.1:compile
解决方案。改为如下:
<dependency>
<groupId>log4j</groupId><artifactId>log4j</artifactId>
<version>1.2.15</version>
<exclusions>
<exclusion>
<groupId>com.sun.jmx</groupId>
<artifactId>jmxri</artifactId>
</exclusion>
<exclusion>
<groupId>com.sun.jdmk</groupId>
<artifactId>jmxtools</artifactId>
</exclusion>
<exclusion>
<groupId>javax.jms</groupId>
<artifactId>jms</artifactId>
</exclusion>
</exclusions>
</dependency>