Property 'sonar.jacoco.reportPath' is deprecated. Please use 'sonar.jacoco.reportPaths' instead.
I keep getting this message when running SonarQube through Gradle and the phrase "reportPath" does not even appear even once in the entire multi-module project. I even put the sonarqube property under allprojects to override any defaults that may be there. Any tips on how I can get rid of this error?
I am using:
allprojects {
sonarqube {
properties {
property "sonar.jacoco.reportPaths", "${project.buildDir}/jacoco/test.exec"
}
}
}
EDIT 1:
Gradle wrapper 3.1
Am using this in the root of build.gradle
plugins {
id "jacoco"
id "org.sonarqube" version "2.5"
}
And tried your suggestion with
allprojects {
sonarqube {
properties {
property "sonar.jacoco.reportPath", ""
property "sonar.jacoco.reportPaths", "${project.buildDir}/jacoco/test.exec"
}
}
}
No dice, what do you think?
SonarSource analyzers do not run your tests or generate reports. They only import pre-generated reports. The reports from coverage tools (Jacoco …) are consumed by Sonarqube.
JaCoCo vs SonarQube: What are the differences? JaCoCo: A code coverage library for Java. It is a free code coverage library for Java, which has been created based on the lessons learned from using and integration existing libraries for many years; SonarQube: Continuous Code Quality.
Yes, presumably. SonarQube reads the report that JaCoCo gives it. If JaCoCo excludes certain classes, then SonarQube shouldn't get any data on them.
The question is, which version of the sonarQube gradle plugin you are using: https://docs.sonarqube.org/display/SCAN/Analyzing+with+SonarQube+Scanner+for+Gradle
The sonarqube gradle plugin sets some values per default, eg. if you use JaCoCo, which is probably the case, it automatically adds that field, besides the groovy one too.
So generally speaking, you need to wait for an update of the sonarqube gradle plugin, which gets rid of this, and is using the other config value.
Maybe you can also try to override the setting, by setting it to empty like sonar.jacoco.reportPath=
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