Advanced parameters
There are extra-parameters that can be used when running the Sonar maven plugin.
Hide sources
Sometimes, for security or other reasons, project sources must not be published.
option |
sonar.importSources |
usage |
|
from pom.xml |
|
since version |
1.5 |
Inject historical data
When using Sonar, it becomes quickly necessary to input historical data and to highlight some events. It is possible by going for example in a tag and use the sonar.projectDate option. By default, the version name to be used is the one in the pom.xml, but it is possible to override it using the sonar.projectVersion option.
option |
sonar.projectDate & sonar.projectVersion |
usage |
|
from pom.xml |
N/A |
since version |
1.5 |
Exclude certain modules
Some project modules should not be analyzed and consolidated with global project measures, for instance samples, integration tests or generated code.
option |
sonar.skippedModules |
usage |
|
from pom.xml |
N/A |
since version |
1.5 |
Manage branches
It is possible to run the Sonar maven plugin on a branch
option |
branch |
usage |
|
from pom.xml |
|
since version |
1.3 |
Run install goal
In order for Sonar to run properly, the program must be compiled at some point. Until v. 1.4, the Sonar maven plugin was running an install goal by default.
Since v1.5, the default behavior is to not run an install goal.
option |
sonar.skipInstall |
usage |
|
from pom.xml |
N/A |
since version |
default is true since v1.5 |

