Skip to content

Latest commit

 

History

History
34 lines (25 loc) · 1.05 KB

README.md

File metadata and controls

34 lines (25 loc) · 1.05 KB

jacoco-coverage maven plugin

Maven plugin that extracts the total instructions coverage from jacoco xml report and put the int result into file. Mojo class is used for define the plugin goal.

The library is hosted on Maven Central:

Maven

<dependency>
    <groupId>com.yopeso</groupId>
    <artifactId>jacococoverage-maven-plugin</artifactId>
    <version>PLUGIN_VERSION</version>
</dependency>

Gradle

compile 'com.yopeso:jacococoverage-maven-plugin:PLUGIN_VERSION'

How to use it:

Cmd

> mvn com.yopeso:jacococoverage-maven-plugin:PLUGIN_VERSION:coverage -Dcoverage.report=target/site/jacoco/jacoco.xml -Dcoverage.result=target/site/jacoco/coverage_result.txt

coverage: the goal of the plugin defined in the Mojo class
Dcoverage.report: path of the jacoco xml report
Dcoverage.result: path of the file where will be written the jacoco coverage int number

Available plugin versions you can find here