Plugin Documentation

This report describes goals, parameters details, requirements and sample usage of this plugin.

Goals

Goals available for this plugin:

Goal Report? Description
scoverage:check No Checks if minimum code coverage by unit tests reached in forked scoverage life cycle.

In forked scoverage life cycle project is compiled with SCoverage instrumentation and unit tests are executed before checking.
scoverage:check-only No Checks if coverage minimum reached without forking scoverage life cycle.

Check is performed using available SCoverage data, for example generated by (or SCoverageReportMojo) earlier in the build (or in previous build if it was not cleaned afterwards).
scoverage:help No Display help information on scoverage-maven-plugin.
Call mvn scoverage:help -Ddetail=true -Dgoal=<goal-name> to display parameter details.
scoverage:integration-check No Checks if minimum code coverage by unit and integration tests reached in forked scoverage life cycle.

In forked scoverage life cycle project is compiled with SCoverage instrumentation and unit and integration tests are executed before checking.
scoverage:integration-report Yes Generates code coverage by unit and integration tests report in forked scoverage life cycle.

In forked scoverage life cycle project is compiled with SCoverage instrumentation and unit and integration tests are executed before report generation.
scoverage:integration-test No Executes forked scoverage life cycle up to verify phase.

In forked scoverage life cycle project is compiled with SCoverage instrumentation and unit and integration tests are executed.
scoverage:package No Creates artifact file containing SCoverage instrumented classes.

This file's name has scoverage- prefix to avoid overwriting original (not instrumented) file.
scoverage:post-compile No Restores project original configuration after compilation with SCoverage instrumentation.

Removes changes done in project properties by SCoveragePreCompileMojo before compilation:
  • removes added properties
  • restores original values of modified properties

This is internal mojo, executed in forked scoverage life cycle.
scoverage:pre-compile No Configures project for compilation with SCoverage instrumentation.

Supported compiler plugins:
This is internal mojo, executed in forked scoverage life cycle.
scoverage:report Yes Generates code coverage by unit tests report in forked scoverage life cycle.

In forked scoverage life cycle project is compiled with SCoverage instrumentation and unit tests are executed before report generation.
scoverage:report-only Yes Generates code coverage report without forking scoverage life cycle.

Report is generated using available coverage data generated by: SCoverageCheckMojo, SCoverageIntegrationCheckMojo, or SCoverageIntegrationReportMojo earlier in the build or in previous build if it was not cleaned afterwards.
scoverage:test No Executes forked scoverage life cycle up to test phase.

In forked scoverage life cycle project is compiled with SCoverage instrumentation and unit tests are executed.

System Requirements

The following specifies the minimum requirements to run this Maven plugin:

Maven 3.6.3
JDK 11

System Requirements History

The following specifies the minimum requirements to run this Maven plugin for historical versions:

Plugin Version Maven JDK
from 2.0.1 to 2.0.6 3.6.3 11
from 1.4.11 to 2.0.0 3.0 8
from 1.0.0 to 1.4.1 3.0 6

Usage

You should specify the version in your project's plugin configuration:

<project>
  ...
  <build>
    <!-- To define the plugin version in your parent POM -->
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.scoverage</groupId>
          <artifactId>scoverage-maven-plugin</artifactId>
          <version>2.0.6</version>
        </plugin>
        ...
      </plugins>
    </pluginManagement>
    <!-- To use the plugin goals in your POM or parent POM -->
    <plugins>
      <plugin>
        <groupId>org.scoverage</groupId>
        <artifactId>scoverage-maven-plugin</artifactId>
      </plugin>
      ...
    </plugins>
  </build>
  ...
  <!-- To use the report goals in your POM or parent POM -->
  <reporting>
    <plugins>
      <plugin>
        <groupId>org.scoverage</groupId>
        <artifactId>scoverage-maven-plugin</artifactId>
        <version>2.0.6</version>
      </plugin>
      ...
    </plugins>
  </reporting>
  ...
</project>

For more information, see "Guide to Configuring Plug-ins"