Plugin Documentation

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 SCoverageCheckMojo (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 vefiry 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, SCoverageReportMojo 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.0
JDK 1.8
Memory No minimum requirement.
Disk Space No minimum requirement.

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>1.4.11</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>
        <version>1.4.11</version>
      </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>1.4.11</version>
      </plugin>
      ...
    </plugins>
  </reporting>
  ...
</project>

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