Jacoco 覆盖范围内如何忽略 *.1 类?
我的 POM 中有以下内容:
<execution>
<id>JaCoco Coverage Enforcement</id>
<phase>verify</phase>
<goals>
<goal>check</goal>
</goals>
<configuration>
<dataFile>${project.build.directory}/coverage-reports/jacoco-unit.exec</dataFile>
<excludes>
<exclude>**/MyClass.**</exclude>
</excludes>
<rules>
...
</rules>
</execution>
但是,我收到以下错误消息:
[警告] com.mypackage.MyClass.1 类违反规则:行覆盖率为 0.00,但预期最小值为 0.85
更新 12/19
这是文件夹结构中的内容:
$ find . -iname 'MyClass*class'
./target/classes/com/mypackage/MyClass$1.class
./target/classes/com/mypackage/MyClass.class