clover:clean

Full name:

org.openclover:clover-maven-plugin:4.5.0:clean

Description:

The clover:clean goal should be run directly from the command line, when you are developing using the clover test runner optimizer. This mojo deletes the cloverOutputDirectory contents and the snapshot file used for test optimization.

Attributes:

  • Requires a Maven project to be executed.
  • Binds by default to the lifecycle phase: initialize.

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 value is: ${project.build.directory}/clover/cloverMerge.db.
User property is: maven.clover.cloverMergeDatabase.
<cloverOutputDirectory> String - The directory where the Clover plugin will put all the files it generates during the build process. For example the Clover plugin will put instrumented sources somewhere inside this directory.
Default value is: ${project.build.directory}/clover.
<project> MavenProject -

The Maven project instance for the executing project.

Note: This is passed by Maven and must not be configured by the user.


Default value is: ${project}.

Optional Parameters

Name Type Since Description
<cloverDatabase> String - The location of the Clover database.
User property is: maven.clover.cloverDatabase.
<debug> boolean - If you wish to enable debug level logging in just the Clover plugin, set this to true. This is useful for integrating Clover into the build.
Default value is: false.
User property is: maven.clover.debug.
<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 value is: 500.
User property is: maven.clover.flushInterval.
<keepDb> boolean - A flag to indicate to keep the clover.db but purge all coverage data and other files when clover:clean is run. If set to true, the clover.db file will not be removed.
Default value is: false.
User property is: maven.clover.clean.keepDb.
<license> String - The full Clover license String to use. If supplied, this certificate will be used over licenseLocation. NB. newline chars must be preserved. If not provided, Clover will use a bundled license key.
User property is: maven.clover.license.
<licenseLocation> String - A Clover license file to be used by the plugin. The plugin tries to resolve this parameter first as a resource, then as a URL, and then as a file location on the filesystem. If not provided, Clover will use a bundled license key.
User property is: maven.clover.licenseLocation.
<singleCloverDatabase> boolean - If true, then a single cloverDatabase will be used for the entire project. This flag will be ignored if a custom cloverDatabase location is specified.
Default value is: false.
User property is: maven.clover.singleCloverDatabase.
<skip> boolean - A flag to indicate not to run clover:clean for this execution. If set to true, clean will be skipped will not be run.
Default value is: false.
User property is: maven.clover.clean.skip.
<snapshot> File - The location to store the clover snapshot file. This file needs to persist between builds to enable Clover's build optimization feature. If not specified, the snapshot will be stored next to the cloverDatabase.
User property is: maven.clover.snapshot.
<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 value is: true.
User property is: maven.clover.waitForFlush.

Parameter Details

<cloverDatabase>

The location of the Clover database.
  • Type: java.lang.String
  • Required: 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: Yes
  • User Property: maven.clover.cloverMergeDatabase
  • Default: ${project.build.directory}/clover/cloverMerge.db

<cloverOutputDirectory>

The directory where the Clover plugin will put all the files it generates during the build process. For example the Clover plugin will put instrumented sources somewhere inside this directory.
  • Type: java.lang.String
  • Required: Yes
  • Default: ${project.build.directory}/clover

<debug>

If you wish to enable debug level logging in just the Clover plugin, set this to true. This is useful for integrating Clover into the build.
  • Type: boolean
  • Required: No
  • User Property: maven.clover.debug
  • Default: false

<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: No
  • User Property: maven.clover.flushInterval
  • Default: 500

<keepDb>

A flag to indicate to keep the clover.db but purge all coverage data and other files when clover:clean is run. If set to true, the clover.db file will not be removed.
  • Type: boolean
  • Required: No
  • User Property: maven.clover.clean.keepDb
  • Default: false

<license>

The full Clover license String to use. If supplied, this certificate will be used over licenseLocation. NB. newline chars must be preserved. If not provided, Clover will use a bundled license key.
  • Type: java.lang.String
  • Required: No
  • User Property: maven.clover.license

<licenseLocation>

A Clover license file to be used by the plugin. The plugin tries to resolve this parameter first as a resource, then as a URL, and then as a file location on the filesystem. If not provided, Clover will use a bundled license key.
  • Type: java.lang.String
  • Required: No
  • User Property: maven.clover.licenseLocation

<project>

The Maven project instance for the executing project.

Note: This is passed by Maven and must not be configured by the user.

  • Type: org.apache.maven.project.MavenProject
  • Required: Yes
  • Default: ${project}

<singleCloverDatabase>

If true, then a single cloverDatabase will be used for the entire project. This flag will be ignored if a custom cloverDatabase location is specified.
  • Type: boolean
  • Required: No
  • User Property: maven.clover.singleCloverDatabase
  • Default: false

<skip>

A flag to indicate not to run clover:clean for this execution. If set to true, clean will be skipped will not be run.
  • Type: boolean
  • Required: No
  • User Property: maven.clover.clean.skip
  • Default: false

<snapshot>

The location to store the clover snapshot file. This file needs to persist between builds to enable Clover's build optimization feature. If not specified, the snapshot will be stored next to the cloverDatabase.
  • Type: java.io.File
  • Required: No
  • User Property: maven.clover.snapshot

<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: No
  • User Property: maven.clover.waitForFlush
  • Default: true