Class CheckMojo

java.lang.Object
org.apache.maven.plugin.AbstractMojo
org.jacoco.maven.AbstractJacocoMojo
org.jacoco.maven.CheckMojo
All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo, IViolationsOutput

@Mojo(name="check", defaultPhase=VERIFY, threadSafe=true) public class CheckMojo extends AbstractJacocoMojo implements IViolationsOutput
Checks that the code coverage metrics are being met.
Since:
0.6.1
  • Constructor Details

    • CheckMojo

      public CheckMojo()
  • Method Details

    • executeMojo

      public void executeMojo() throws org.apache.maven.plugin.MojoExecutionException
      Description copied from class: AbstractJacocoMojo
      Executes Mojo.
      Specified by:
      executeMojo in class AbstractJacocoMojo
      Throws:
      org.apache.maven.plugin.MojoExecutionException - if an unexpected problem occurs. Throwing this exception causes a "BUILD ERROR" message to be displayed.
    • onViolation

      public void onViolation(ICoverageNode node, Rule rule, Limit limit, String message)
      Description copied from interface: IViolationsOutput
      Called for every rule violation.
      Specified by:
      onViolation in interface IViolationsOutput
      Parameters:
      node - node which violates a rule
      rule - rule which is violated
      limit - limit which is violated
      message - readable message describing this violation