Basically sonarqube is using jacoco for code coverage. But I want to exclude few classes from coverage. As per few docs I am using mentioned below plugin in the pom.
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<executions>
<execution>
<id>prepare-agent</id>
<goals>
<goal>prepare-agent</goal>
</goals>
</execution>
<execution>
<id>report</id>
<goals>
<goal>report</goal>
</goals>
</execution>
</executions>
<configuration>
<excludes>
<exclude>
src/main/java/org/sample/SampleRepository.java
</exclude>
</excludes>
</configuration>
</plugin>
Sadly it is not working. Need help for that.