2017-10-06 62 views
1

我在设置openclover 4.2.0与SonarQube 6.0一起使用时遇到困难。SonarQube没有显示openclover覆盖率报告

下面是我在日志中:

[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% 

但是为什么?

+0

三叶草中的路径是相对还是绝对的? –

+0

该属性设置这样 '-Dsonar.clover.reportPath =目标/站点/三叶草/ clover.xml' 和clover.xml路径是绝对 https://pastebin.com/5A4mGdwh –

+0

是路径在三叶草报告中,相关的还是绝对的? –

回答

2

我做:

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%