SonarQube 4.5.4: How to exclude files from analysis on a specified module

729 Views Asked by At

I have a multi-module maven project and need to exclude some packages, but the problem is that I have the same package on more than one module.

Is there a way on the Server side to exclude a specifc package on a specific module ?

Thank you

1

There are 1 best solutions below

1
On BEST ANSWER

This is not possible to exclude files on a specific module from within the Web UI, but fortunately you can do it inside the POM file of the module. Just add the following piece of code:

<properties>
    <sonar.exclusions>**/my/package/**/*</sonar.exclusions>
</properties>