Skip to content

Maven plugin that summarizes quality metrics from different source into a single file

License

Notifications You must be signed in to change notification settings

exasol/quality-summarizer-maven-plugin

Repository files navigation

quality-summarizer-maven-plugin

Build Status Maven Central – Quality Summarizer Maven Plugin

Quality Gate Status

Security Rating Reliability Rating Maintainability Rating Technical Debt

Code Smells Coverage Duplicated Lines (%) Lines of Code

This Maven plugin takes quality metrics produced by tools like JaCoCo and summarizes them in a single file during build.

The purpose of this file is to be picked up by a crawler from a CI build and is then written into a quality database. Note that the crawler and the database are both outside the scope of this Maven plugin.

File Format

The target file format is described in a JSON schema.

A typical file looks like this:

{
  "project" : "my-project",
  "commit" : "a2464f0...",
  "date" : "2024-12-31T19:30:00Z",
  "coverage" : 0.92
}

Usage

Add the following plugin to your pom.xml:

<plugin>
    <groupId>com.exasol</groupId>
    <artifactId>quality-summarizer-maven-plugin</artifactId>
    <version>CURRENT_VERSION</version>
    <executions>
        <execution>
            <id>summarize-metrics</id>
            <goals>
                <goal>summarize</goal>
            </goals>
        </execution>
    </executions>
</plugin>

Using the default configuration, the plugin will search for the Jacoco report file in the following locations:

  • target/jacoco.xml
  • target/site/jacoco.xml
  • target/site/jacoco/jacoco.xml
  • target/site/jacoco-aggregate/jacoco.xml

You can configure a custom location like this:

<plugin>
    <groupId>com.exasol</groupId>
    <artifactId>quality-summarizer-maven-plugin</artifactId>
    <version>CURRENT_VERSION</version>
    <executions>
        <execution>
            <id>summarize-metrics</id>
            <goals>
                <goal>summarize</goal>
            </goals>
        </execution>
    </executions>
    <configuration>
        <jacocoReport>target/site/custom-file.xml</jacocoReport>
    </configuration>
</plugin>

Information for Users

Information for Developers