Skip to end of metadata
Go to start of metadata
You are viewing an old version of this page. View the current version. Compare with Current ·  View Page History

Description / Features

Get code coverage with Atlassian Clover.

Installation

  1. Install the Clover plugin through the Update Center or download it into the SONAR_HOME/extensions/plugins directory
  2. Restart the Sonar server

Usage

In order to make Sonar use the Clover Java code coverage engine, the property 'sonar.java.coveragePlugin' must be set to 'clover'. It can be set in different locations:

  • Global settings (Settings > Configuration > General Settings > Java). It will apply to all Java projects.
  • Project settings (Project > Configuration > Settings > Java). It will apply to this specific project.
  • Build tool settings, for example a Maven property in the pom or a command-line property.

From the settings pages, the version of the Maven Clover plugin to be used and the license key can be set.
By uploading the license key (clover 1 or clover 2) into Sonar, you will benefit from a centralized configuration.
By default, the sonar-plugin-clover1 runs the maven-clover-plugin.
By default, the sonar-plugin-clover2 runs the maven-clover2-plugin.

In case the Clover plugin is defined in the pom.xml of your project, Sonar will use the version defined in the pom with its attached configuration.

See the Code Coverage by Unit Tests tutorial.

Known Limitations

Change Log

Release 2.9 (2 issues)
Type Key Summary Priority
Improvement SONARPLUGINS-2397 Support the new property 'sonar.java.coveragePlugin' Major
Improvement SONARPLUGINS-2363 Upgrade to Sonar 3.0 API Minor

 

Release 2.8 (1 issues)
Type Key Summary Priority
Improvement SONARPLUGINS-1147 Clover should support Maven 3 by default Major

 

Release 2.7 (1 issues)
Type Key Summary Priority
Improvement SONARPLUGINS-1031 Support coverage of new code Major

Labels
  • None