Class SCoverageCheckMojo

java.lang.Object
org.apache.maven.plugin.AbstractMojo
org.scoverage.plugin.SCoverageCheckMojo
All Implemented Interfaces:
ContextEnabled, Mojo
Direct Known Subclasses:
SCoverageCheckOnlyMojo, SCoverageIntegrationCheckMojo

@Mojo(name="check", threadSafe=false) @Execute(lifecycle="scoverage", phase=TEST) public class SCoverageCheckMojo extends AbstractMojo
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.
Since:
1.0.0
Author:
Grzegorz Slowikowski
  • Constructor Details

    • SCoverageCheckMojo

      public SCoverageCheckMojo()
  • Method Details

    • execute

      public void execute() throws MojoFailureException
      Checks tests coverage and optionally fails the build if minimum level not reached.
      Throws:
      MojoFailureException - if coverage is below minimumCoverage and failOnMinimumCoverage option set