Sonar scanner - 3.1
Java 1.7
I'm trying to configure sonar properties to get coverage from a multi-module project. Coverage is generated under the path: Module/build/jacoco/test.exec, so I wanted to add it to sonar.properties file according to documentation:
https://docs.sonarqube.org/display/PLUG/Code+Coverage+by+Unit+Tests+for+Java+Project
sonar.java.coveragePlugin=jacoco
sonar.jacoco.reportPaths=**/build/jacoco/*.exec
I was trying different combinations even with the absolute path but it seems that sonar-scanner doesn't see this property at all and always looks at default path. I'm always getting information in the logs that:
INFO: JaCoCoSensor: JaCoCo report not found : path\target\jacoco.exec
INFO: JaCoCoSensor: JaCoCo IT report not found: path\target\jacoco-it.exec
It does read other properties from the file like login, password, language, sources etc.
Also, the project is based on Gradle.
If you're building with Gradle, you should Analyze with Gradle. Specifically, there's no need for a sonar-project.properties
file. Instead, you configure the SonarQube plugin in your build.gradle
, and most of this should just work.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With