Hello everyone I have error which breaks up my build for no reason, here is the error message :
error: error reading
/.m2/repository/com/sun/jdmk/jmxtools/1.2.1/jmxtoo开发者_运维问答ls-1.2.1.jar;
error in opening zip file error: error
reading
/.m2/repository/com/sun/jmx/jmxri/1.2.1/jmxri-1.2.1.jar;
error in opening zip file
I'm using this dependency :
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.15</version>
<scope>provided</scope>
</dependency>
How can I fix this ?
You most likely don't need jmxtools or jmxri, so you can probably exclude them from your dependencies:
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.15</version>
<scope>provided</scope>
<exclusions>
<exclusion>
<groupId>com.sun.jdmk</groupId>
<artifactId>jmxtools</artifactId>
</exclusion>
<exclusion>
<groupId>com.sun.jmx</groupId>
<artifactId>jmxri</artifactId>
</exclusion>
</exclusions>
</dependency>
Seriously, these dependencies on JMX, JMS, Java Mail are ridiculous and having to deal with exclusions to do some logging makes me speechless. So, I'd rather use the previous version of log4j (1.2.14) or just switch to logback.
精彩评论