https://github.com/handofgod94/jacoco-cov-badge-maven-plugin
Generate High Quality SVG, PNG and JPG Coverage badges locally from jacoco report as part of build
https://github.com/handofgod94/jacoco-cov-badge-maven-plugin
badge jacoco java jpg maven maven-plugin png svg
Last synced: about 2 months ago
JSON representation
Generate High Quality SVG, PNG and JPG Coverage badges locally from jacoco report as part of build
- Host: GitHub
- URL: https://github.com/handofgod94/jacoco-cov-badge-maven-plugin
- Owner: HandOfGod94
- License: unlicense
- Created: 2018-08-22T15:18:54.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2021-06-15T15:55:21.000Z (almost 4 years ago)
- Last Synced: 2023-07-27T16:29:04.429Z (almost 2 years ago)
- Topics: badge, jacoco, java, jpg, maven, maven-plugin, png, svg
- Language: Java
- Homepage:
- Size: 234 KB
- Stars: 7
- Watchers: 2
- Forks: 10
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# Jacoco Coverage Badge Maven Plugin
[](https://travis-ci.org/HandOfGod94/jacoco-cov-badge-maven-plugin)
[](https://coveralls.io/github/HandOfGod94/jacoco-cov-badge-maven-plugin?branch=master)
[](https://gitter.im/jacoco-cov-badge-maven-plugin/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) [](https://www.codacy.com/app/HandOfGod94/jacoco-cov-badge-maven-plugin?utm_source=github.com&utm_medium=referral&utm_content=HandOfGod94/jacoco-cov-badge-maven-plugin&utm_campaign=Badge_Grade) [](https://search.maven.org/search?q=g:%22io.github.handofgod94%22%20AND%20a:%22jacoco-cov-badge-maven-plugin%22)Checkout Wiki for more info:
[https://github.com/HandOfGod94/jacoco-cov-badge-maven-plugin/wiki](https://github.com/HandOfGod94/jacoco-cov-badge-maven-plugin/wiki)## Contents
- [Features](#features)
- [Introduction](#introduction)
- [Quickstart](#quickstart)
- [Build Steps](#build-steps)
- [Usage](#usage)## Features
* Automatically reads `jacoco.csv` reports and generates badge from it locally
* Can be integrated as part of the build process
* Auto color badges based on the coverage percentage from jacoco reports 
 * Configurable badge keys
 
* Generate badges for various categories from `jacoco` report
 
## Introduction
`jacoco-cov-badge-maven-plugin` is a maven plugin which can generate `svg`,
`png` or `jpg` badges *locally* by calculating code coverage from `jacoco` report.Jacoco is code coverage utility which generates nice report for
Java Based projects and is generally integrated as maven build plugin.There are several online utilities like `coveralls`, `shields.io` etc. which
provides badges as a service.> It is highly inspired from `gh-badges` which `shields.io` also uses for
> generating badges.## Quickstart
The plugin needs `jacoco.csv` report, for it to function correctly.
So you can bind it to any phase after the `jacoco.csv` reports gets generated.Although these are configurable, but some assumptions made by the plugin:
**Default jacoco report location**: `${project.reporting.outputDirectory}/jacoco/jacoco.csv`
**Default Output location**:`${project.build.directory}/coverage.svg````xml
io.github.handofgod94
jacoco-cov-badge-maven-plugin
1.1.0
generate-badge
post-site
badge
```
## Build Steps
```shell
# To build jar file for plugin
./mvnw clean package# To install it in local repo
./mvnw clean install
```Use `mvnw.cmd` for windows system.
## Usage
```shell
mvn io.github.handofgod94:jacoco-cov-badge-maven-plugin:1.1.0:badge # if you just want to execute goal
```See [quickstart](#quickstart) example, if you want to use it inside `pom.xml`
Checkout project wiki for more information.