clover:clover

Note:

This goal should be used as a Maven report.

Full name:

org.openclover:clover-maven-plugin:4.5.2:clover

Description:

Generate a Clover report from existing Clover databases. The generated report is an external report generated by Clover itself. If the project generating the report is a top level project and if the aggregate configuration element is set to true then an aggregated report will also be created.

Note: This report mojo should be an @aggregator and the clover:aggregate mojo shouldn't exist. This is a limitation of the site plugin which doesn't support @aggregator reports...

Attributes:

  • Requires a Maven project to be executed.
  • The goal is not marked as thread-safe and thus does not support parallel builds.

Required Parameters

Name Type Since Description
<cloverMergeDatabase> String - The location of the merged clover database to create when running a report in a multimodule build.
Default: ${project.build.directory}/clover/cloverMerge.db
User Property: maven.clover.cloverMergeDatabase
<historyDir> String -

The location where historical Clover data will be saved.

Note: It's recommended to modify the location of this directory so that it points to a more permanent location as the ${project.build.directory} directory is erased when the project is cleaned.


Default: ${project.build.directory}/clover/history
User Property: maven.clover.historyDir
<outputDirectory> File - The directory where the Clover report will be generated.
Default: ${project.reporting.outputDirectory}/clover
User Property: maven.clover.outputDirectory

Optional Parameters

Name Type Since Description
<alwaysReport> boolean - If set to true, a report will be generated even in the absence of coverage data.
Default: true
User Property: maven.clover.alwaysReport
<charset> String - The charset to use in the html reports.
Default: UTF-8
User Property: maven.clover.charset
<cloverDatabase> String - The location of the Clover database.
User Property: maven.clover.cloverDatabase
<contextFilters> String - Comma or space separated list of Clover somesrcexcluded (block, statement or method filers) to exclude when generating coverage reports.
User Property: maven.clover.contextFilters
<flushInterval> int - When the Clover Flush Policy is set to "interval" or threaded this value is the minimum period between flush operations (in milliseconds).
Default: 500
User Property: maven.clover.flushInterval
<generateHistorical> boolean - Decide whether to generate a Clover historical report or not.
Default: false
User Property: maven.clover.generateHistorical
<generateHtml> boolean - Decide whether to generate an HTML report or not.
Default: true
User Property: maven.clover.generateHtml
<generateJson> boolean - Decide whether to generate a JSON report or not.
Default: false
User Property: maven.clover.generateJson
<generatePdf> boolean - Decide whether to generate a PDF report or not.
Default: false
User Property: maven.clover.generatePdf
<generateXml> boolean - Decide whether to generate a XML report or not.
Default: true
User Property: maven.clover.generateXml
<includeFailedTestCoverage> boolean 4.4.0 Specifies whether to include failed test coverage when calculating the total coverage percentage.
Default: false
User Property: maven.clover.includeFailedTestCoverage
<license> String -
See also: com.atlassian.maven.plugin.clover.internal.AbstractCloverMojo.license
User Property: maven.clover.license
<licenseLocation> String -
See also: com.atlassian.maven.plugin.clover.internal.AbstractCloverMojo.licenseLocation
User Property: maven.clover.licenseLocation
<orderBy> String - How to order coverage tables.
Default: PcCoveredAsc
User Property: maven.clover.orderBy
<reportDescriptor> File - Use a custom report descriptor for generating your Clover Reports. The format for the configuration file is identical to an Ant build file which uses the <clover-report/> task. For a complete reference, please consult the: Creating custom reports and clover-report documentation
User Property: maven.clover.reportDescriptor
<repositories> List<ArtifactRepository> - Remote repositories used for the project.
Default: ${project.remoteArtifactRepositories}
<resolveReportDescriptor> boolean - If set to true, the clover-report configuration file will be resolved as a versioned artifact by looking for it in your configured maven repositories - both remote and local.
Default: false
User Property: maven.clover.resolveReportDescriptor
<showInnerFunctions> boolean 3.2.1 Whether to show inner functions, i.e. functions declared inside methods in the report. This applies to Java8 lambda functions for instance. If set to false then they are hidden on the list of methods, but code metrics still include them. Note: if you will use showLambdaFunctions=true and showInnerFunctions=false then only lambda functions declared as a class field will be listed.
Default: false
User Property: maven.clover.showInnerFunctions
<showLambdaFunctions> boolean 3.2.1 Whether to show lambda functions in the report. Lambda functions can be either declared inside method body or as a class field. If set to false then they are hidden on the list of methods, but code metrics still include them. Note: if you will use showLambdaFunctions=true and showInnerFunctions=false then only lambda functions declared as a class field will be listed.
Default: false
User Property: maven.clover.showLambdaFunctions
<showUniqueCoverage> boolean 4.4.0 Calculate and show unique per-test coverage (for large projects, this can take a significant amount of time).
Default: false
User Property: maven.clover.showUniqueCoverage
<singleCloverDatabase> boolean - If true, then a single database will be saved for the entire project, in the target directory of the execution root. If a custom location for the cloverDatabase is specified, this flag is ignored.
Default: false
User Property: maven.clover.singleCloverDatabase
<span> String - A span specifies the age of the coverage data that should be used when creating a report.
User Property: maven.clover.span
<title> String - Title of the report
Default: ${project.name} ${project.version}
User Property: maven.clover.title
<titleAnchor> String - Title anchor of the report
Default: ${project.url}
User Property: maven.clover.titleAnchor
<waitForFlush> boolean - If true we'll wait 2*flushInterval to ensure coverage data is flushed to the Clover database before running any query on it.

Note: The only use case where you would want to turn this off is if you're running your tests in a separate JVM. In that case the coverage data will be flushed by default upon the JVM shutdown and there would be no need to wait for the data to be flushed. As we can't control whether users want to fork their tests or not, we're offering this parameter to them.


Default: true
User Property: maven.clover.waitForFlush

Parameter Details

<alwaysReport>

If set to true, a report will be generated even in the absence of coverage data.
  • Type: boolean
  • Required: report.plugin.goal.no
  • User Property: maven.clover.alwaysReport
  • Default: true

<charset>

The charset to use in the html reports.
  • Type: java.lang.String
  • Required: report.plugin.goal.no
  • User Property: maven.clover.charset
  • Default: UTF-8

<cloverDatabase>

The location of the Clover database.
  • Type: java.lang.String
  • Required: report.plugin.goal.no
  • User Property: maven.clover.cloverDatabase

<cloverMergeDatabase>

The location of the merged clover database to create when running a report in a multimodule build.
  • Type: java.lang.String
  • Required: report.plugin.goal.yes
  • User Property: maven.clover.cloverMergeDatabase
  • Default: ${project.build.directory}/clover/cloverMerge.db

<contextFilters>

Comma or space separated list of Clover somesrcexcluded (block, statement or method filers) to exclude when generating coverage reports.
  • Type: java.lang.String
  • Required: report.plugin.goal.no
  • User Property: maven.clover.contextFilters

<flushInterval>

When the Clover Flush Policy is set to "interval" or threaded this value is the minimum period between flush operations (in milliseconds).
  • Type: int
  • Required: report.plugin.goal.no
  • User Property: maven.clover.flushInterval
  • Default: 500

<generateHistorical>

Decide whether to generate a Clover historical report or not.
  • Type: boolean
  • Required: report.plugin.goal.no
  • User Property: maven.clover.generateHistorical
  • Default: false

<generateHtml>

Decide whether to generate an HTML report or not.
  • Type: boolean
  • Required: report.plugin.goal.no
  • User Property: maven.clover.generateHtml
  • Default: true

<generateJson>

Decide whether to generate a JSON report or not.
  • Type: boolean
  • Required: report.plugin.goal.no
  • User Property: maven.clover.generateJson
  • Default: false

<generatePdf>

Decide whether to generate a PDF report or not.
  • Type: boolean
  • Required: report.plugin.goal.no
  • User Property: maven.clover.generatePdf
  • Default: false

<generateXml>

Decide whether to generate a XML report or not.
  • Type: boolean
  • Required: report.plugin.goal.no
  • User Property: maven.clover.generateXml
  • Default: true

<historyDir>

The location where historical Clover data will be saved.

Note: It's recommended to modify the location of this directory so that it points to a more permanent location as the ${project.build.directory} directory is erased when the project is cleaned.

  • Type: java.lang.String
  • Required: report.plugin.goal.yes
  • User Property: maven.clover.historyDir
  • Default: ${project.build.directory}/clover/history

<includeFailedTestCoverage>

Specifies whether to include failed test coverage when calculating the total coverage percentage.
  • Type: boolean
  • Since: 4.4.0
  • Required: report.plugin.goal.no
  • User Property: maven.clover.includeFailedTestCoverage
  • Default: false

<license>


See also: com.atlassian.maven.plugin.clover.internal.AbstractCloverMojo.license
  • Type: java.lang.String
  • Required: report.plugin.goal.no
  • User Property: maven.clover.license

<licenseLocation>


See also: com.atlassian.maven.plugin.clover.internal.AbstractCloverMojo.licenseLocation
  • Type: java.lang.String
  • Required: report.plugin.goal.no
  • User Property: maven.clover.licenseLocation

<orderBy>

How to order coverage tables.
  • Type: java.lang.String
  • Required: report.plugin.goal.no
  • User Property: maven.clover.orderBy
  • Default: PcCoveredAsc

<outputDirectory>

The directory where the Clover report will be generated.
  • Type: java.io.File
  • Required: report.plugin.goal.yes
  • User Property: maven.clover.outputDirectory
  • Default: ${project.reporting.outputDirectory}/clover

<reportDescriptor>

Use a custom report descriptor for generating your Clover Reports. The format for the configuration file is identical to an Ant build file which uses the <clover-report/> task. For a complete reference, please consult the: Creating custom reports and clover-report documentation
  • Type: java.io.File
  • Required: report.plugin.goal.no
  • User Property: maven.clover.reportDescriptor

<repositories>

Remote repositories used for the project.
  • Type: java.util.List<org.apache.maven.artifact.repository.ArtifactRepository>
  • Required: report.plugin.goal.no
  • Default: ${project.remoteArtifactRepositories}

<resolveReportDescriptor>

If set to true, the clover-report configuration file will be resolved as a versioned artifact by looking for it in your configured maven repositories - both remote and local.
  • Type: boolean
  • Required: report.plugin.goal.no
  • User Property: maven.clover.resolveReportDescriptor
  • Default: false

<showInnerFunctions>

Whether to show inner functions, i.e. functions declared inside methods in the report. This applies to Java8 lambda functions for instance. If set to false then they are hidden on the list of methods, but code metrics still include them. Note: if you will use showLambdaFunctions=true and showInnerFunctions=false then only lambda functions declared as a class field will be listed.
  • Type: boolean
  • Since: 3.2.1
  • Required: report.plugin.goal.no
  • User Property: maven.clover.showInnerFunctions
  • Default: false

<showLambdaFunctions>

Whether to show lambda functions in the report. Lambda functions can be either declared inside method body or as a class field. If set to false then they are hidden on the list of methods, but code metrics still include them. Note: if you will use showLambdaFunctions=true and showInnerFunctions=false then only lambda functions declared as a class field will be listed.
  • Type: boolean
  • Since: 3.2.1
  • Required: report.plugin.goal.no
  • User Property: maven.clover.showLambdaFunctions
  • Default: false

<showUniqueCoverage>

Calculate and show unique per-test coverage (for large projects, this can take a significant amount of time).
  • Type: boolean
  • Since: 4.4.0
  • Required: report.plugin.goal.no
  • User Property: maven.clover.showUniqueCoverage
  • Default: false

<singleCloverDatabase>

If true, then a single database will be saved for the entire project, in the target directory of the execution root. If a custom location for the cloverDatabase is specified, this flag is ignored.
  • Type: boolean
  • Required: report.plugin.goal.no
  • User Property: maven.clover.singleCloverDatabase
  • Default: false

<span>

A span specifies the age of the coverage data that should be used when creating a report.
  • Type: java.lang.String
  • Required: report.plugin.goal.no
  • User Property: maven.clover.span

<title>

Title of the report
  • Type: java.lang.String
  • Required: report.plugin.goal.no
  • User Property: maven.clover.title
  • Default: ${project.name} ${project.version}

<titleAnchor>

Title anchor of the report
  • Type: java.lang.String
  • Required: report.plugin.goal.no
  • User Property: maven.clover.titleAnchor
  • Default: ${project.url}

<waitForFlush>

If true we'll wait 2*flushInterval to ensure coverage data is flushed to the Clover database before running any query on it.

Note: The only use case where you would want to turn this off is if you're running your tests in a separate JVM. In that case the coverage data will be flushed by default upon the JVM shutdown and there would be no need to wait for the data to be flushed. As we can't control whether users want to fork their tests or not, we're offering this parameter to them.

  • Type: boolean
  • Required: report.plugin.goal.no
  • User Property: maven.clover.waitForFlush
  • Default: true