Full documentation for SonarQube has moved to a new location: http://docs.sonarqube.org/display/SONAR

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Wiki Markup
{iframe:src=http://update.sonarsource.org/plugins/pdfreport.html|width=700|height=250|frameborder=0}
Your browser does not support iframes.
{iframe}

If you are happy with PDF Plugin then you could recommend it.

There is also Commercial edition supported by klicap.

Description / Features

This plugin allows to generate a report in PDF format that contains the most relevant information showed by SonarQubeTM web interface. The report aims to be a deliverable as part of project documentation.
Actually the report contains:

  • Global dashboard (similar to SonarQubeTM web interface dashboard)
  • Violations by categories
  • Hotspots:
    • Most violated rules
    • Most violated files
    • Most complex classes
    • Most duplicated files
  • Dashboard, violations and hotspots for all child modules (if they exists)

You can download an example of report here.

Usage

Maven Plugin

First analyze your project in SonarQubeTM. Then run the generate goal (report will be created in the target directory):

Code Block
 mvn org.codehaus.sonar-plugins.pdf-report:maven-pdfreport-plugin:1.3:generate

Available properties (-Dproperty=value)

  • sonar.host.url: SonarQubeTM server URL (i.e http://my-host:9000/sonar)
  • sonar.branch (-Dbranch is also supported): report on a project branch
  • report.type: select a report type. Values:
    • -Dreport.type=executive
    • -Dreport.type=workbook (default)
  • sonar.pdf.username: username for access WS API
  • sonar.pdf.password: password for the user

If your SonarQubeTM server URL is http://localhost:9000 you don't need to specify sonar.host.url.

SonarQubeTM Plugin (post-job)

 
SonarQubeTM PDF can be used as a plugin of SonarQubeTM modeling a post-job work. In this way, a PDF report is generated after each analysis in SonarQubeTM (mvn sonar:sonar includes the generation of report).
 
How to install SonarQubeTM PDF

Use update center, or alternatively:

  • Dowload sonar-pdfreport-plugin-1.3.jar
  • Copy to [sonar-dir]/extensions/plugins
  • Restart SonarQubeTM

Configuration

You can skip report generation or select report type (executive or workbook) at top level or project level. Also you can provide an username/password if your project are secured by SonarQubeTM user management:

Download the report

PDF report can be downloaded from SonarQubeTM GUI:

Changelog

JIRA Issues
anonymoustrue
titleRelease 1.3.1
height70
width900
columnstype;key;summary;priority;status;resolution
urlhttp://jira.codehaus.org/sr/jira.issueviews:searchrequest-xml/temp/SearchRequest.xml?fixfor=19241&pid=11911&sorter/field=issuekey&sorter/order=DESC&tempMax=1000

 

JIRA Issues
anonymoustrue
titleRelease 1.3
height70
width900
columnstype;key;summary;priority;status;resolution
urlhttp://jira.codehaus.org/sr/jira.issueviews:searchrequest-xml/temp/SearchRequest.xml?fixfor=16935&pid=11911&sorter/field=issuekey&sorter/order=DESC&tempMax=1000

 

JIRA Issues
anonymoustrue
titleRelease 1.2.1
height70
width900
columnstype;key;summary;priority;status;resolution
urlhttp://jira.codehaus.org/sr/jira.issueviews:searchrequest-xml/temp/SearchRequest.xml?fixfor=17650&pid=11911&sorter/field=issuekey&sorter/order=DESC&tempMax=1000

 

JIRA Issues
anonymoustrue
titleRelease 1.2
height70
width900
columnstype;key;summary;priority;status;resolution
urlhttp://jira.codehaus.org/sr/jira.issueviews:searchrequest-xml/temp/SearchRequest.xml?fixfor=16308&pid=11911&sorter/field=issuekey&sorter/order=DESC&tempMax=1000

 

JIRA Issues
anonymoustrue
titleRelease 1.1
height70
width900
columnstype;key;summary;priority;status;resolution
urlhttp://jira.codehaus.org/sr/jira.issueviews:searchrequest-xml/temp/SearchRequest.xml?fixfor=16307&pid=11911&sorter/field=issuekey&sorter/order=DESC&tempMax=1000

 

JIRA Issues
anonymoustrue
titleRelease 1.0
height70
width900
columnstype;key;summary;priority;status;resolution
urlhttp://jira.codehaus.org/sr/jira.issueviews:searchrequest-xml/temp/SearchRequest.xml?fixfor=16007&pid=11911&sorter/field=issuekey&sorter/order=DESC&tempMax=1000

 

JIRA Issues
anonymoustrue
titleRelease 0.3
height70
width900
columnstype;key;summary;priority;status;resolution
urlhttp://jira.codehaus.org/sr/jira.issueviews:searchrequest-xml/temp/SearchRequest.xml?fixfor=15327&pid=11911&sorter/field=issuekey&sorter/order=DESC&tempMax=1000

 

JIRA Issues
anonymoustrue
titleRelease 0.2
height70
width900
columnstype;key;summary;priority;status;resolution
urlhttp://jira.codehaus.org/sr/jira.issueviews:searchrequest-xml/temp/SearchRequest.xml?fixfor=15253&pid=11911&sorter/field=issuekey&sorter/order=DESC&tempMax=1000

 

JIRA Issues
anonymoustrue
titleRelease 0.1
height70
width900
columnstype;key;summary;priority;status;resolution
urlhttp://jira.codehaus.org/sr/jira.issueviews:searchrequest-xml/temp/SearchRequest.xml?fixfor=15232&pid=11911&sorter/field=issuekey&sorter/order=DESC&tempMax=1000

 

Known limitations

Ant task and Sonar Runner are not supported.