jacoco 代码覆盖率报告生成器显示错误:“捆绑'代码覆盖率报告'中的类与执行数据不匹配”
我正在使用jacoco:report标签生成jacoco报告。我收到以下错误:
[jacoco:report] Classes in bundle 'Code Coverage Report' do no match with execution data. For report generation the same class files must be used as at runtime.
[jacoco:report] Execution data for class xxxxx does not match.
[jacoco:report] Execution data for class yyyyy does not match.
蚂蚁报告目标如下所示:
<target name="report">
<jacoco:report>
<executiondata>
<file file="${jacocoexec.dir}/${jacocoexec.filename}"/>
</executiondata>
<!-- the class files and optional source files ... -->
<structure name="Code Coverage Report">
<classfiles>
<fileset file="./jar/abc.jar"/>
</classfiles>
<sourcefiles>
<fileset dir="./code/src"/>
</sourcefiles>
</structure>
<!-- to produce reports in different formats. -->
<html destdir="${jacoco.report.dir}"/>
</jacoco:report>
</target>
因此生成的是仅使用。那么为什么它会给出这样的错误。有什么想法吗?abc.jar
./code/src