Skip to content
This repository has been archived by the owner on Nov 21, 2023. It is now read-only.

☂️ Coverage reports uploader for Codecov based on bash script

License

Notifications You must be signed in to change notification settings

alexengrig/codecov-maven-plugin

Repository files navigation

codecov-maven-plugin Maven Central JavaDoc GitHub

travis-ci codecov

Upload reports to Codecov based on bash script.

Get Started

Add this code (using JaCoCo Plugin for generate report) to your pom.xml:

<build>
    <plugins>
        <!-- JaCoCo Plugin -->
        <plugin>
            <groupId>org.jacoco</groupId>
            <artifactId>jacoco-maven-plugin</artifactId>
            <version>0.8.5</version>
            <executions>
                <execution>
                    <goals>
                        <goal>prepare-agent</goal>
                    </goals>
                </execution>
                <execution>
                    <id>report</id>
                    <phase>test</phase>
                    <goals>
                        <goal>report</goal>
                    </goals>
                </execution>
            </executions>
        </plugin>
        <!-- Codecov Plugin -->
        <plugin>
            <groupId>dev.alexengrig</groupId>
            <artifactId>codecov-maven-plugin</artifactId>
            <version>1.0</version>
            <executions>
                <execution>
                    <id>upload</id>
                    <phase>test</phase>
                    <goals>
                        <goal>upload</goal>
                    </goals>
                </execution>
            </executions>
        </plugin>
    </plugins>
</build>

Add CODECOV_TOKEN with your token of Codecov project to environment variables in your TravisCI project repository.

License

This project is licensed under Apache License, version 2.0.