Skip to content
This repository was archived by the owner on Jun 26, 2025. It is now read-only.

martinvisser/kover-maven-plugin

Repository files navigation

Note

This repository is obsolete now Kotlin has its own: https://github.com/Kotlin/kotlinx-kover

Kover Maven Plugin

This plugin is based on the Gradle Plugin.

Usage

<build>
    <extensions>
        <extension>
            <groupId>io.github.martinvisser</groupId>
            <artifactId>kover-maven-plugin</artifactId>
            <version>{version}</version>
        </extension>
    </extensions>

    <pluginManagement>
        <plugins>
            <plugin>
                <groupId>io.github.martinvisser</groupId>
                <artifactId>kover-maven-plugin</artifactId>
                <version>{version}</version>
            </plugin>
        </plugins>

        <plugin>
            <groupId>io.github.martinvisser</groupId>
            <artifactId>kover-maven-plugin</artifactId>
            <configuration>
                <!-- Rules are optional, but if none are configured the plugin cannot verify the coverage -->
                <rules>
                    <rule>
                        <minValue>85</minValue>
                        <metric>LINE</metric>
                        <aggregation>COVERED_PERCENTAGE</aggregation>
                    </rule>
                    <rule>
                        <minValue>85</minValue>
                        <metric>BRANCH</metric>
                        <aggregation>COVERED_PERCENTAGE</aggregation>
                    </rule>
                </rules>
            </configuration>
        </plugin>
    </pluginManagement>
</build>

Known issues (for contributors of this plugin)

  • During executing tests the following message might appear: The MojoDescriptor for the goal prepare-agent cannot be null
    • Solved by running mvn compile first as it needs a plugin.xml in target/classes/META-INF/maven/.

About

Maven fork of the kotlinx-kover gradle plugin

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages