Coverage analysis don't works for me

I try to run a sonar analysis with maven and view results in the Sonarqube server (coverage with Jacoco).

SonarQube: 6.7
jacoco-maven-plugin: 0.8.6

In POM file:



In settings.xml:



                <!-- Optional URL to server. Default value is http://localhost:9000 -->

I run:
mvn clean install

mvn sonar:sonar

And console shows me:

[INFO] Analysing /<route>/target/jacoco.exec
[WARNING] Coverage information was not collected. Perhaps you forget to include debug information into compiled classes?

Analysis is show in Sonarqube with 0 bugs and without coverage info

¿What is happend?


Where were the jacoco.exec files generated?

In the right path, //target

My problem now is the next:
[INFO] JaCoCo report not found: ‘/mnt/mesos/sandbox/workspace/c/target/jacoco-it.exec’
[INFO] JaCoCo report not found: ‘/mnt/mesos/sandbox/workspace/c/target/jacoco.exec’

Server have a properties configuration:

is it possible than the report files must be in this folder?


You’ve added a whole lot of properties to your pom file, many of them unnecessarily. TBH, my first step here would be to comment out or clean out all of those properties, reanalyze & see what you got.


Thank you very much!

Finally I have chosen to use sonar-scanner with a properties file, and it’s works!

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.