Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Key

Description

Default value

sonar.jdbc.url

JDBC Connection URL

jdbc:h2:tcp://localhost:9092/sonar

Prior to SonarQubeTM 3SonarQube3.2: jdbc:derby://localhost:1527/sonar

sonar.jdbc.username

User for the JDBC Connection

sonar

sonar.jdbc.password

Password for the JDBC Connection

sonar

...

Key

Description

Default value

Version

sonar.projectDescription

Description of the project.
Set through <description> when using Maven. 

  
sonar.binaries

Comma-separated paths to directories containing binaries (in case of Java: directories with class files).
Not compatible with Maven: binaries retrieved from default location for Java Maven projects. 

  
sonar.tests

Comma-separated paths to directories containing tests.
Not compatible with Maven: tests retrieved from default location for Java Maven projects.  

  
sonar.libraries

Comma-separated paths to files with third-party libraries (in case of Java: JAR files). Pattern can be used.

Example:

Code Block
languagenone
sonar.libraries=path/to/specific/library/myLibrary.jar,path/to/library/*.jar

Note that * wildcard character is not supported for directories (only for files).

This property is used by rule engines during issues detection (mainly SonarQubeTM engine SonarQubeengine and FindBugs engines which rely on bytecode). Having the bytecode of these libraries allows to get more information on coupling, possible null parameters when calling external APIs, etc. and thus getting more accuracy during issues detection.

  

Anchor
parameterSourceEncoding
parameterSourceEncoding
sonar.sourceEncoding

Encoding of source files. Example of values: UTF-8, MacRoman, Shift_JIS. This property can be replaced by the standard property project.build.sourceEncoding in Maven projects.

The list of available encodings depends on your JVM. See http://docs.oracle.com/javase/1.5.0/docs/guide/intl/encoding.doc.html.

System encoding

 

sonar.importSources

Sometimes, for security or other reasons, project sources must not be stored and displayed.

true

since 1.5

Anchor
parameterProjectDate
parameterProjectDate
sonar.projectDate

It becomes quickly necessary to input historical data and to highlight some events. It is possible by going for example in a subversion tag and use the sonar.projectDate option. Format is yyyy-MM-dd, for example 2010-12-25.

Current date

since 1.5

sonar.exclusions

Exclude files from analysis. See Project Administration for more details. This page also details sonar.tests.exclusions, sonar.inclusions, sonar.tests.inclusions, sonar.global.exclusions, sonar.global.tests.exclusions.

 

 

sonar.skippedModules

Some project modules should not be analyzed and consolidated with global project measures, for instance samples, integration tests or generated code.
If a module's artifactId differs from its module name (the directory name): it is the artifactId that should be use instead of the module name. Format is a comma-separated list of modules: module1_to_exclude,module2_to_exclude.

 

since 1.5

sonar.includedModules

Comma-separated list of the modules to analyse, all other modules are automatically ignored. Be careful: the root project must be added to the list.
If a module's artifactId differs from its module name (the directory name) : it is the artifactId that should be use instead of the module name.

 

since 2.2

Anchor
parameterBranch
parameterBranch
sonar.branch

Manage SCM branches. Two branches of the same project are considered as different projects in SonarQubeTM.

 

since 1.10

sonar.profile

Through the web interface, you can define as many quality profiles as you want and you can easily associate one of these quality profiles to a given project.

Default profile for the given language

since 1.6

sonar.skipDesign

To skip the computation of design metrics and dependencies.

Currently only available for Java.

false

since 2.0

sonar.phase

When SonarQubeTM needs SonarQubeneeds a Maven phase or goal to be executed prior to the analysis, this parameter can be used. For example sonar.phase=generate-sources. This property is used only for Maven analysis.

 

since 1.10

sonar.dynamicAnalysis

Dynamic analysis relates to unit tests. By default, those unit tests are executed but you can optionally decide to do only static analysis or to reuse existing reports which have been previously generated. Possible values are true, false, reuseReports.

See the Code Coverage by Unit Tests tutorial for details and examples.

true

since 1.7

Anchor
workingDirectory
workingDirectory
sonar.working.directory

To set the working directory for the SonarQube TM Runner or the SonarQube TM Ant Task (versions greater than 2.0).

Beware: the specified folder is deleted before running each analysis.

.sonar 

...