SonarQube 没有显示 openclover 覆盖率报告

SonarQube isn't showing openclover coverage report

我在设置 openclover 4.2.0 以使用 SonarQube 6.0 时遇到困难。

这是我在日志中的内容:

[INFO] [08:42:14.706] Sensor org.sonar.plugins.clover.CloverSensor
[INFO] [08:42:14.707] 2/2 source files have been analyzed
[INFO] [08:42:14.707] Parsing /workspace/topparent/biz/target/site/clover/clover.xml
[WARN] [08:42:14.709] Resource /workspace/topparent/biz/src/main/java/biz/BizClass.java was not found.
[WARN] [08:42:14.710] Resource /workspace/topparent/biz/src/main/java/integration/FirstClass.java was not found.
[INFO] [08:42:14.711] Matched files in report : 0%
[WARN] [08:42:14.711] 2 files in clover report did not match any file in SonarQube Index : /workspace/topparent/biz/src/main/java/biz/BizClass.java, /workspace/topparent/biz/src/main/java/integration/FirstClass.java, 
[INFO] [08:42:14.711] Sensor org.sonar.plugins.clover.CloverSensor (done) | time=5ms

不知道为什么找不到.java文件,路径是正确的。我想我没有看到覆盖率报告是因为这个:

Matched files in report : 0%

但是为什么呢?

我在做:

mvn clover:setup verify clover:aggregate clover:clover sonar:sonar -sonar.host.url=...

我把它分成了 2 个单独的命令:

mvn clover:setup verify clover:aggregate clover:clover

然后

mvn sonar:sonar -sonar.host.url=...

现在可以使用了。

Matched files in report : 100%