Reputation: 1231
This question is based on Sonar-Cobertura custom filters but as this was about Cobertura and my problem is with jacoco i think a new one is better.
Now that i had time to test the suggested property i must say it doesn't seem to work as expected. I wanted to exclude all content in a "command" package from the test coverage reports (as these will be tested in a system test and not in the normal nightly build). So i was setting the sonar.coverage.exclusions
property in my ant build. The output was looking good:
[sonar:sonar] 15:04:50.223 INFO - Excluded sources for coverage:
[sonar:sonar] 15:04:50.223 INFO - src/main/java/**/command/*.java
But the project dashboard didn't change. All command classes are still listed with 0% coverage (the overall coverage did not increase). I even double checked with a project where some commands have coverage and these are still listed with the the same percentage as without the property set.
Setting the property manually in the Sonarqube instance or on the project didn't work too.
Here are the used components:
Any ideas what i missed or where to look next?
Upvotes: 1
Views: 969