jiangxincode/ApkToolBoxGUI

升级pdfbox依赖版本后测试覆盖率变为0

jiangxincode opened this issue · 1 comments

从以下修改之后:cdead78

coverall.io显示的覆盖率降为0:
https://coveralls.io/builds/64326402

image

本地使用mvn clean test测试,

升级之前
[INFO] --- maven-surefire-plugin:3.2.5:test (default-test) @ ApkToolBoxGUI ---
[INFO] Using auto detected provider org.apache.maven.surefire.junit4.JUnit4Provider

升级之后
[INFO] --- maven-surefire-plugin:3.2.5:test (default-test) @ ApkToolBoxGUI ---
[INFO] Using auto detected provider org.apache.maven.surefire.junitplatform.JUnitPlatformProvider

使用mvn dependency:tree打印依赖关系,差别如下:

image

原因是pdfbox中依赖了junit-platform-xxx,导致maven-surefire-plugin插件自动选择Providerorg.apache.maven.surefire.junitplatform.JUnitPlatformProvider而不是之前的org.apache.maven.surefire.junit4.JUnit4Provider

结合maven-surefire-plugin介绍显示指定Provider:
https://maven.apache.org/surefire/maven-surefire-plugin/examples/providers.html

see also:
1b51d8b