Upgrading from Sonar 8.9.2 to Sonar 9.4, problem with project coverage with jdk 11

Hi everyone,
I have a Sonarqube Enterprise version 8.9.2 but i have to update to 9.4; but when execute maven command, then I have problems with the plugins sonar (sonar.plugin.cobertura version 2.7) because, when I execute the command mvn clean verify sonar:sonar cobertura:cobertura -Dcobertura.report.format=xml -e -X con la version Maven 3.6.3 jdk 11, this error appear:

[ERROR] Failed to execute goal org.codehaus.mojo:cobertura-maven-plugin:2.7:clean (verificar-cobertura) on project sri-recaudacion: **Execution verificar-cobertura** of goal org.codehaus.mojo:cobertura-maven-plugin:2.7:clean failed: Plugin org.codehaus.mojo:cobertura-maven-plugin:2.7 or one of its dependencies could not be resolved: Could not find artifact com.sun:tools:jar:0 at specified path C:\ProgramFiles\Java\jdk-11.0.9/../lib/tools.jar -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.codehaus.mojo:cobertura-maven-plugin:2.7:clean (verificar-cobertura) on project sri-recaudacion: Execution verificar-cobertura of goal org.codehaus.mojo:cobertura-maven-plugin:2.7:clean failed: Plugin org.codehaus.mojo:cobertura-maven-plugin:2.7 or one of its dependencies could not be resolved: Could not find artifact com.sun:tools:jar:0 at **specified path C:\ProgramFiles\Java\jdk-11.0.9/../lib/tools.jar**
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:215)

Someone have idea for this error?
Regards
Michel

someone any idea

Hi,

Welcome to the community!

I suppose this is going to be about compatibility between Cobertura and Java 11, which is really out of scope for this community. That said, by 9.4, Cobertura isn’t supported for Java anymore. So instead of debugging this, you might want to just switch straight to JaCoCo.

 
HTH,
Ann

Hi G Ann,
Thank you for you response.
Do you have any information for jacoco, how i do to implemented this option?

Take a look at this guide.