in our gradle module, we use jacoco to measure code coverage, and we create an aggregated jacoco-exec file. In order for the sonarqube plugin to use this file to create reports, we configured it as follows:
sonarqube {
properties {
property "sonar.jacoco.reportPath", "$project.rootDir/build/jacoco/jacoco.exec"
}
}
When you start the sonarqube plugin using gradle sonarqube, it prints the following messages:
10:56:00.064 INFO - Analysing C:\A\Projekte\sqs\git\build\sonar\de.kvb.sqs_admin-db\jacoco-overall.exec
10:56:00.116 INFO - No information about coverage per test.
10:56:00.116 INFO - Sensor JaCoCoOverallSensor done: 116 ms
...
10:56:00.718 INFO - Sensor JaCoCoSensor...
10:56:00.720 INFO - Analysing C:\A\Projekte\sqs\git\build\jacoco\jacoco.exec
10:56:00.738 INFO - No information about coverage per test.
...
10:56:06.442 INFO - Analysing C:\A\Projekte\sqs\git\build\sonar\de.kvb.sqs_admin-gui\jacoco-overall.exec
10:56:06.453 INFO - No information about coverage per test.
10:56:06.453 INFO - Sensor JaCoCoOverallSensor done: 31 ms
...
10:56:06.833 INFO - Sensor JaCoCoSensor...
10:56:06.837 INFO - Analysing C:\A\Projekte\sqs\git\build\jacoco\jacoco.exec
10:56:06.863 INFO - No information about coverage per test.
Two questions:
1) Why does the sonarqube plugin create all these jacoco-general.exec files?
2) Why does the sonarqube plugin use not only my jacoco.exec file to generate coverage reports, but also all these jacoco-general.exec files?
THX, Martin.
source
share