Parameters to configure project analysis of project can be set in various places in Sonar. Here is the hierarchy of parameters:
- Global analysis parameters, defined in the UI, will apply to all the projects
- Project analysis parameters, defined in the UI, will override global parameters
- Project analysis parameters, defined in project analysis configuration file or in analyzer configuration file, will override the ones defined in the UI
- Command line parameters, defined when launching an analysis, will override project analysis parameters
sonar.profileparameter via command line for a specific project, it will not be stored in the database. Then, a local analysis in Eclipse will be run against the default quality profile.
|sonar||Sonar server Server URL||http://localhost:9000|
JDBC Driver used by Sonar
Prior to Sonar 3.2: org.apache.derby.jdbc.ClientDriver
JDBC Connection URL
Prior to Sonar 3SonarQube3.2: jdbc:derby://localhost:1527/sonar
User for the JDBC Connection
Password for the JDBC Connection
The project key that is unique for each project.
Name of the project that will be displayed on the web interface.
The project version.
Sets Set the language of source code. If a Sonar plugin allows to analyze another language, the associated source code analyser can be activated with this property.The default language can be set at instance level: go to Configuration > General Settings > General and set the sonar.language property.
Comma-separated paths to directories containing sources.
Description of the project.
Comma-separated paths to directories containing binaries (in case of Java: directories with class files).
Comma-separated paths to directories containing tests.
Comma-separated paths to files with third-party libraries (in case of Java: JAR files). Pattern can be used.
Note that * */ wildcard character is not supported for directories (only for files).
This property is used by rule engines during issues detection (mainly 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.
Encoding of source files. Example of values: UTF-8, MacRoman, Shift_JIS. This property can be replaced by the standard property
The list of available encodings depends on your JVM. See http://docs.oracle.com/javase/1.5.0/docs/guide/intl/encoding.doc.html.
Sometimes, for security or other reasons, project sources must not be stored and displayed.
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
Exclude files from analysis. This property is usually set in the page Settings of the project. It's a comma separated list of wildcard patterns. Paths are defined from the source base directory. Example: com/mycompany/*.java,**/*Dummy.java.
See Project Administration for more details. This page also details
Some project modules should not be analyzed and consolidated with global project measures, for instance samples, integration tests or generated code.
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.
Manage SCM branches. Two branches of the same project are considered as different projects in SonarSonarQube.
Through the Sonar web interface, you can define as many quality profiles as you want and you can easily associate one of this these quality profile profiles to a given project. You can also make this association by using the property "sonar.profile".
Default profile for the given language
Java bytecode analysis. Since Sonar 2.0, the java bytecode is analyzed by Sonar in order to extract dependencies between packages and files. Those dependencies are used for instance to display the DSM (Dependency System Matrix). This bytecode analysis can be deactivated.To skip the computation of design metrics and dependencies.
Currently only available for Java.
Run maven phase or goal prior to analysis. When Sonar needs a When SonarQubeneeds a Maven phase or maven goal to be executed prior to the analysis, this parameter can be used. For example
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
See the Code Coverage by Unit Tests tutorial for details and examples.
To set the working directory for theSonar
SonarQube Runner or theSonar
SonarQube Ant Task (versions greater than 2.0).
Beware: the specified folder is deleted before running each analysis.
Increasing HTTP timeouts of requests to Sonar server. The Maven plugin executes some HTTP requests to the Sonar server. Two timeouts makes the call fail fails if the server connection is too slow. In such a case the timeouts can be increased from Maven properties.
respectively 30'000 and 60'000 milliseconds
|Display logs to know where time is spent|
|Display all the SQL requests executed on batch side||since Sonar 2.14, Sonar Ant Task 1.4 & Sonar Runner 1.3|
|Display the result of all SQL requests executed on batch side||since Sonar 2.14, Sonar Ant Task 1.4 & Sonar Runner 1.3|
|Activation of the DEBUG mode on batch side||since Sonar 2.12, Sonar Ant Task 1.3 & Sonar Runner 1.2|