问题描述
我想为我的项目生成覆盖率报告。为此,我发现我可以使用 cobertura [https://stackoverflow.com/questions/2006014/how-to-generate-cobertura-code-coverage-report-using-maven-from-hudson]。
我在 pom.xml
中为 java 11
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>cobertura-maven-plugin</artifactId>
<version>2.5.2</version>
<configuration>
<classesDirectory>./test</classesDirectory>
<formats>
<format>xml</format>
</formats>
</configuration>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>cobertura</goal>
</goals>
</execution>
</executions>
</plugin>
我想,当我运行 mvn cobertura:cobertura
时,我收到了未关闭的 java.lang.classFormatError: nest member class_info_index 35 has bad constant type in class file
。当我运行 mvn clean package
时,文件会运行,但不会生成 .xml
文件。有什么方法可以实现覆盖率报告。
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)