SonarQube shows 0 code coverage

Must-share information (formatted with Markdown):

  • SonarQube: 8.2.0.32929

  • sonar-scanner: 3.0.3.778

  • jacoco: 0.8.4

  • jdk: 1.8

  • what are you trying to achieve
    I am trying to achieve code coverage by using sonar-scanner but I am getting code coverage 0 in sonarqube dashboard.

  • what have you tried so far to achieve this

I configured the multi-module java project using https://github.com/SonarSource/sonar-scanning-examples/tree/master/sonarqube-scanner-maven/maven-multimodule

and created sonar-project.properties file in base directory with below configuration

**
sonar.projectKey=org.sonarqube.sonarscanner-maven-aggregate
sonar.projectName=Sonar Scanner Maven Aggregate
sonar.projectVersion=1.0
sonar.language=java
sonar.java.binaries=.
**

If I use mvn sonar:sonar it works. but with sonar-scanner it is not working.

It works fine with sonarqube 7.8.

Any insight would be appreciated.

Hey there.

You should almost always use mvn sonar:sonar if aven is your build tool instead of the SonarQube Scanner. Why do you want to use the scanner instead?

My organization is using sonar-scanner.