Real need help about coverage mismatch according jacoco and sonar


  • Community Edition Version 10.2.1 (build 78527)
  • jdk 11
  • maven sonar plugin sonar-maven-plugin:
  • jacoco plugin jacoco-maven-plugin:0.8.10

we have integration maven/jacoco/sonar in our multi module maven project.
after we run the commnad

mvn $SONAR_OPTS clean test verify sonar:sonar

we check the local jacoco report:

however, we check the sonar server page:

so, our question is, why the coverage in sonar server is 0.0%?

the maven project structure is

cloud-common(repo root)
|-- event-starter
      |-- pom.xml
|-- cloud-common
      |-- pom.xml
|-- cloud-common-jacoco
      |-- pom.xml
|-- pom.xml

the pom.xml in repo root have <modules> elements
event-starter module depend on module cloud-common
cloud-common-jacoco is a special module which depends on event-starter and cloud-common, and have a report-aggregate


the java class NeedRemovedService in cloud-common and our tests are in event-starter modules

again, after maven run, we check the report in cloud-common-jacoco , I think it match our expect.

very thanks if any suggestions as blocked months

What do the logs say about the import of code coverage?