Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 5 Next »

Advanced parameters


How to hide sources

Since Sonar 1.5

Sometimes, for security reasons, project sources should not be published. In such a case set the parameter 'sonar.importSources' to false from maven command line :

or directly from pom.xml :

How to analyse past revisions

Since Sonar 1.5

Guess that we can :

  • Retrieve an old version of an application with the Version Control System (for example a tag in Subversion)
  • This version builds successfully

To launch Sonar on that version, add the parameter 'sonar.projectDate' to the mvn command line. Example :

The project version is set into the file pom.xml, but it's also possible to override it :

How to exclude some modules

Since Sonar 1.5

Some project modules should not be analysed and consolidated with global project measures, for example samples or integration tests. Add the following parameter to the mvn command to exclude modules when analysing sources :

Example :

How to manage different SCM branches of my project ?

Execute the maven plugin with the following parameter :

You can also set the property directly into the pom.xml  :

  • No labels