在JDK version - 1.8.51
junit - 4.12
org.codehaus.mojo/cobertura-maven-plugin - 2.7
powermock-easymock-release-full - 1.6.2
net.sourceforge.cobertura / cobertura - 2.1.1
中构建多模块maven项目时,我的测试失败率低于此值。
Error Message
net.sourceforge.cobertura.coveragedata.TouchCollector.registerClass(Ljava/lang/String;)V
Stacktrace
java.lang.NoSuchMethodError: net.sourceforge.cobertura.coveragedata.TouchCollector.registerClass(Ljava/lang/String;)V
以上所有内容都是最新的插件。
测试失败
错误1
Error Message
Could not initialize class com.test.it.logging.EventLogHandler
Stacktrace
java.lang.NoClassDefFoundError: Could not initialize class com.test.it.logging.EventLogHandler
错误2
Error Message
Failed to transform class with name com.test.it.ra.ReportArchiveConfProvider. Reason: cannot find net.sourceforge.cobertura.coveragedata.LightClassmapListener
Stacktrace
java.lang.IllegalStateException: Failed to transform class with name com.test.it.ra.ReportArchiveConfProvider. Reason: cannot find net.sourceforge.cobertura.coveragedata.LightClassmapListener
at
org.powermock.core.classloader.MockClassLoader.loadMockClass(MockClassLoader.java:266)
错误3
{{1}}
JFYI它与JDK 7和旧版插件一起正常工作。有人遇到过这个问题吗?请帮忙。
答案 0 :(得分:1)
我与你没有相同的配置,但围绕LightClassmapListener遇到了同样的错误。我通过清理工作区来解决问题。
在詹金斯的工作中;点击工作区,然后选择“擦除当前工作区”#39;