TheBakker TheBakker - 2 months ago 22
Java Question

How to configure SonarQube 5.3 to tune what submodule / package is used to determinate coverage?

I'm using SonarQube 5.3 and working a mavenized java project containing 3 submodules.

One of this submodule is my webapp for which there are not junit test, I would like to remove it from the coverage % shown on the main sonar page.

Also if possible, I would like to exclude some package from the other submodule, like Entity package ...

Didn't find any clear answer, I tried to add this in my webapp pom.xml :

<sonar.coverage.exclusions>src/main</sonar.coverage.exclusions>


But no luck.

Answer

After fiddling around I found out that the UI parameter was not taken into account. I'd to add this in my submodule pom.xml I'm pretty sure I'd tried this earlier but since then we had updated Sonar version.

<properties>
    <sonar.coverage.exclusions>src/main/java/**</sonar.coverage.exclusions>
</properties>
Comments