Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3
Wiki Markup
{hudsonjenkins-plugin-info:pluginId=sonar}
Warning

Before making release of Hudson Sonar Plugin, please contact current maintainer (dev@sonar.codehaus.org) or whole Sonar Team (all@sonarsource.com).

Excerpt

Quickly benefit from Sonar, an open-source Code Quality Management Platform based on many well known analysis tools like Checkstyle, PMD, Findbugs, Cobertura, ....

...

Once your technical project is configured in Hudson, just activate the Sonar plugin in order to analyze your source code according to the following quality axes :

  • Respect of coding rules violations
  • Density of documented API
  • Density of duplicated Code
  • Level of code coverage by Unit Tests
  • Density of potential bugs
  • Complexity distribution
Why use Sonar?
  • There isn't any necessary configuration for Maven project and a basic one for Ant project
  • All those quality axes are displayed in one page : the project dashboard
  • You can easily drill down from the measure values to the module (Maven), package and classes (source code viewer)

Sonar drives many tools including among others :

Screenshots

All projects

Image Removed

Project dashboard

Image Removed

Configuration

  1. Install and start the Sonar server
  2. Activate the Sonar plugin from the Hudson Plugin Manager
  3. Define a Sonar installation from the Configure System page. Some advanced parameters are used when overriding default Sonar configuration.
  4. Activate Sonar on jobs from the "Post-build actions" section.
  5. Build your project
    Info

    We recommend to execute Sonar at the most on nightly builds. It's useless to activate it on continuous builds.

  6. View your project in Sonar application (default is http://localhost:9000)

Compatibility matrix

Plugin

1.0

1.1

1.2.2

1.3.1

1.4+

Sonar

1.8+

1.8+

1.8+

1.8+

1.8+

Hudson

1.306+

1.317+

1.341+

1.344+

1.344+

Support

Please post comments and questions on the Sonar mailing-list. Issues are listed in JIRA.

Older releases

Older releases can be found here: http://hudson-ci.org/download/plugins/sonar/

Release notes

Release 1.6 (not released)

Jira Issues
width800px
anonymoustrue
urlhttp://jira.codehaus.org/sr/jira.issueviews:searchrequest-xml/temp/SearchRequest.xml?fixfor=16345&pid=11911&sorter/field=priority&sorter/order=DESC&tempMax=1000

Release 1.5 (March 22, 2010)

Jira Issues
width800px
anonymoustrue
urlhttp://jira.codehaus.org/sr/jira.issueviews:searchrequest-xml/temp/SearchRequest.xml?fixfor=16312&pid=11911&sorter/field=priority&sorter/order=DESC&tempMax=1000

Release 1.4 (March 13, 2010)

Warning

Before upgrade please make a backup of your Hudson configuration and carefully read following notes.

Note

If you are using version above 1.2, then before upgrade make sure that your jobs was saved with proper configuration. In order to do it, execute following script from Hudson Script Console:

Code Block
import hudson.model.*
import hudson.maven.*
import hudson.tasks.*
for(item in Hudson.instance.items) {
 println("JOB : "+item.name);
 if (item instanceof MavenModuleSet) {
   println(">MAVEN MODULE SET");
   item.save();
 } else if(item instanceof FreeStyleProject) {
   println(">FREESTYLE PROJECT");
   item.save();
 }
 println("\n=======\n");
}
Note

If you are using version below 1.2, then:

  1. download version 1.2.2 or 1.3.1
  2. perform manual upgrade, using Manage Plugins -> Advanced -> Upload Plugin
  3. perform automatic upgrade to version 1.4 (see instructions above)
Jira Issues
width800px
anonymoustrue
urlhttp://jira.codehaus.org/sr/jira.issueviews:searchrequest-xml/temp/SearchRequest.xml?fixfor=16255&pid=11911&sorter/field=priority&sorter/order=DESC&tempMax=1000

Release 1.3.1 (February 27, 2010)

Jira Issues
width800px
anonymoustrue
urlhttp://jira.codehaus.org/sr/jira.issueviews:searchrequest-xml/temp/SearchRequest.xml?jqlQuery=project+%3D+SONARPLUGINS+AND+fixVersion+in+%28%22JENKINS-1.3.1%22%2C+%22JENKINS-1.3%22%29+AND+status+%3D+Closed+ORDER+BY+priority+DESC&tempMax=1000

Release 1.2.2 (February 3, 2010)

Warning

This version introduces some changes to configuration files. Upgrade will be performed automatically, but before upgrade please make a backup of your Hudson configuration.

Note

Most probably next plugin version will be incompatible with versions below 1.2, so it's highly recommended to update to this version.

Jira Issues
width800px
anonymoustrue
urlhttp://jira.codehaus.org/sr/jira.issueviews:searchrequest-xml/temp/SearchRequest.xml?jqlQuery=project+%3D+SONARPLUGINS+AND+fixVersion+in+%28%22JENKINS-1.2.2%22%2C+%22JENKINS-1.2.1%22%2C+%22JENKINS-1.2%22%29+AND+status+%3D+Closed+ORDER+BY+priority+DESC&tempMax=1000

Release 1.1 (August 1, 2009)

Note

When upgrading to this version, please be aware that "Skip on SCM build" (Default Yes) is becoming "Poll SCM" (Default No) under Triggers section. Due to technical limitation, this data could not be migrated to 1.1, and therefore if it was unchecked in certain jobs, the new box should be manually checked.

Jira Issues
width800px
anonymoustrue
urlhttp://jira.codehaus.org/sr/jira.issueviews:searchrequest-xml/temp/SearchRequest.xml?fixfor=15346&pid=11911&sorter/field=priority&sorter/order=DESC&tempMax=1000

Release 1.0.1 (June 3, 2009)

Jira Issues
width800px
anonymoustrue
urlhttp://jira.codehaus.org/sr/jira.issueviews:searchrequest-xml/temp/SearchRequest.xml?fixfor=15303&pid=11911&sorter/field=priority&sorter/order=DESC&tempMax=1000

Release 1.0 (May 20, 2009)

Jira Issues
width800px
anonymoustrue
urlhttp://jira.codehaus.org/sr/jira.issueviews:searchrequest-xml/temp/SearchRequest.xml?fixfor=14982&pid=11911&sorter/field=priority&sorter/order=DESC&tempMax=1000
|sourceDir=../SonarSource/sonar-scanner-jenkins}
Note
titleDocumentation of SonarQube plugin available in SonarQube wiki

http://redirect.sonarsource.com/plugins/jenkins.html
Please don't use this page to ask questions or report bugs.

Excerpt

This plugin allow easy integration of SonarQube™, the open source platform for Continuous Inspection of code quality.