Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/veithen/jacoco-report-maven-plugin

Maven plugin that processes JaCoCo execution data and produces coverage reports that can be uploaded to codecov.io
https://github.com/veithen/jacoco-report-maven-plugin

codecov jacoco maven-plugin

Last synced: 13 days ago
JSON representation

Maven plugin that processes JaCoCo execution data and produces coverage reports that can be uploaded to codecov.io

Awesome Lists containing this project

README

        

# jacoco-report-maven-plugin

This Maven plugin processes JaCoCo execution data and produces coverage reports that can then be uploaded to [codecov.io](https://codecov.io). The main difference with respect to other tools is that it correctly computes cross-module coverage in multi-module Maven builds.

To use the plugin, add the following to your project's root POM:


com.github.veithen.maven
jacoco-report-maven-plugin
x.y.z



process



This would be used in conjunction with the standard jacoco-maven-plugin to generate the execution data that is processed by jacoco-report-maven-plugin:


org.jacoco
jacoco-maven-plugin
0.8.2



prepare-agent



With Github Actions you can then upload the coverage report using a configuration like this:

- name: Upload Coverage Report
uses: codecov/codecov-action@v4
with:
fail_ci_if_error: true
files: ./target/coverage.json
token: ${{ secrets.CODECOV_TOKEN }}

You might want to exclude the code from some modules from the coverage reports, e.g. modules that contain test utilities. In this case, set the `includeClasses` parameter to false for those modules:


com.github.veithen.maven
jacoco-report-maven-plugin

false

If your project provides a Maven plugin and has integration tests set up with [maven-invoker-plugin](https://maven.apache.org/plugins/maven-invoker-plugin/), use the following configuration to collect coverage data from those integration tests:




maven-invoker-plugin
3.1.0

${argLine}