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.
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
}
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>