SonarQube没有显示开放式覆盖报告

时间:2017-10-06 06:57:28

标签: sonarqube clover

我在设置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%

但为什么?

1 个答案:

答案 0 :(得分:2)

我在做:

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

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

mvn clover:setup verify clover:aggregate clover:clover

然后

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

它现在有效。

Matched files in report : 100%