TheBakker
TheBakker

Reputation: 3042

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.

Upvotes: 1

Views: 288

Answers (2)

TheBakker
TheBakker

Reputation: 3042

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>

Upvotes: 0

G. Ann - SonarSource Team
G. Ann - SonarSource Team

Reputation: 22794

Set this through the UI in the Administration > General Settings > Analysis Scope > Code Coverage section

Upvotes: 1

Related Questions