SonarQube shows 0 code coverage

Must-share information (formatted with Markdown):

  • SonarQube:

  • sonar-scanner:

  • 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

and created file in base directory with below configuration

sonar.projectName=Sonar Scanner Maven Aggregate

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.