I'm using the Gradle plugins for JaCoCo and SonarQube yet when I execute
gradle clean jacoco sonarqube
I get an error stating
INFO - Analysing ${buildDir}/build/jacoco/test.exec
WARN - Coverage information was not collected. Perhaps you forget to include debug information into compiled classes?
build.gradle
plugins {
id 'java'
id 'jacoco'
id 'org.sonarqube' version '2.0.1'
}
dependencies {
...
testCompile "junit:junit:4.12"
}
JaCoCo version: 0.7.1.201405082137 Gradle version: 2.12 Java version: 1.8.0_92
However, when I open the html report generated by JaCoCo it shows valid coverage results with lines highlighted properly.
The path to the test.exec file is correct and that file has contents.
What would cause this?
答案 0 :(得分:1)
这最终成为我运行的JaCoCo版本与SonarQube版本(4.5.4)之间的版本不兼容。升级SonarQube解决了这个问题。