Hi.
I’m not sure if you’ve come up with the solution as yet. Here’s my take on it.
It seems in both cases, you are excluding the test package. Coverage however is applied to the src package. Try excluding specific directories/classes from your src package for the sonar.coverage.exclusions property.