Maven:程序包org.apache.log4j不存在问题处理
1 <dependency> 2 <groupId>log4j</groupId> 3 <artifactId>log4j</artifactId> 4 <version>1.2.15</version> 5 <exclusions> 6 <exclusion> 7 <groupId>javax.mail</groupId> 8 <artifactId>mail</artifactId> 9 </exclusion> 10 <exclusion> 11 <groupId>javax.jms</groupId> 12 <artifactId>jms</artifactId> 13 </exclusion> 14 <exclusion> 15 <groupId>com.sun.jdmk</groupId> 16 <artifactId>jmxtools</artifactId> 17 </exclusion> 18 <exclusion> 19 <groupId>com.sun.jmx</groupId> 20 <artifactId>jmxri</artifactId> 21 </exclusion> 22 </exclusions> 23 <scope>compile</scope> 24 </dependency> 25 26 注意log4j的scope为<scope>compile</scope>
文章来自:http://www.cnblogs.com/hxsyl/p/5536846.html