jacoco:check

Full name:

org.jacoco:jacoco-maven-plugin:0.6.2.201302030002:check

Description:

Checks that the code coverage metrics are being met.

Attributes:

Required Parameters

Name Type Since Description
check CheckConfiguration -

Check configuration. Used to specify minimum coverage percentages that must be met. Defaults to 0% if a percentage ratio is not specified.

Example requiring 100% coverage for class, instruction, method, branch, complexity, and line:


<check>
  <classRatio>100</classRatio>
  <instructionRatio>100</instructionRatio>
  <methodRatio>100</methodRatio>
  <branchRatio>100</branchRatio>
  <complexityRatio>100</complexityRatio>
  <lineRatio>100</lineRatio>
</check>

haltOnFailure boolean - Halt the build if any of the checks fail.
Default value is: true.

Optional Parameters

Name Type Since Description
dataFile File - File with execution data.
Default value is: ${project.build.directory}/jacoco.exec.
excludes List - A list of class files to exclude from instrumentation/analysis/reports. May use wildcard characters (* and ?). When not specified nothing will be excluded.
includes List - A list of class files to include in instrumentation/analysis/reports. May use wildcard characters (* and ?). When not specified everything will be included.
skip boolean - Flag used to suppress execution.
Default value is: false.

Parameter Details

check:

Check configuration. Used to specify minimum coverage percentages that must be met. Defaults to 0% if a percentage ratio is not specified.

Example requiring 100% coverage for class, instruction, method, branch, complexity, and line:


<check>
  <classRatio>100</classRatio>
  <instructionRatio>100</instructionRatio>
  <methodRatio>100</methodRatio>
  <branchRatio>100</branchRatio>
  <complexityRatio>100</complexityRatio>
  <lineRatio>100</lineRatio>
</check>

dataFile:

File with execution data.

excludes:

A list of class files to exclude from instrumentation/analysis/reports. May use wildcard characters (* and ?). When not specified nothing will be excluded.

haltOnFailure:

Halt the build if any of the checks fail.

includes:

A list of class files to include in instrumentation/analysis/reports. May use wildcard characters (* and ?). When not specified everything will be included.

skip:

Flag used to suppress execution.