Configuring the Sonar Jenkins Plugin
Adding Sonar Server
You can define as many Sonar servers as you wish. To add a Sonar server, just follow the three steps below:
1. Log into Jenkins as an administrator and go to Manage Jenkins > Configure System:
2. Scroll down to the Sonar configuration section and click on 'Add Sonar':
3. Configure your Sonar installation:
The logical name of the server
Check it if you want to disable this server
The URL to access your Sonar server (default to http://localhost:9000). This is the URL used when the analysis will be launched by Jenkins
Server public URL
This is the URL which the user should use to connect to Sonar. If it's not specified the Server URL will be used.
The JDBC URL to connect to the database hosting the Sonar database
The login to connect to the database hosting the Sonar database
The password to connect to the database hosting the Sonar database the password will be encrypted on the configuration file.
The Java driver classname to be used to connect to the database
Version of sonar-maven-plugin
If you want to force the use of a specific sonar-maven-plugin, you can set it here.
The properties you want to pass to Sonar, you must use the format : -Dsome.property=some.value -Danother.property=another.value
Skip if triggered by SCM Changes
If you want to skip Sonar analysis when the Jenkins build is launched by a change in the SCM, check it
Skip if triggered by the build of a dependency
If you want to skip Sonar analysis when the Jenkins build is launched by the build of a dependency, check it
Skip if environment variable is defined
If the variable set is defined, Sonar analysis will be skipped