Skip to content

Instantly share code, notes, and snippets.

@maciejwalkowiak
Last active December 27, 2015 16:39
Show Gist options
  • Save maciejwalkowiak/7356628 to your computer and use it in GitHub Desktop.
Save maciejwalkowiak/7356628 to your computer and use it in GitHub Desktop.
jacoco-maven-plugin configuration. mvn verify to make build fail if coverage is too small
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.6.3.201306030806</version>
<executions>
<execution>
<id>default-prepare-agent</id>
<goals>
<goal>prepare-agent</goal>
</goals>
</execution>
<execution>
<id>default-report</id>
<phase>prepare-package</phase>
<goals>
<goal>report</goal>
</goals>
</execution>
<execution>
<id>default-check</id>
<goals>
<goal>check</goal>
</goals>
<configuration>
<rules>
<rule>
<element>BUNDLE</element>
<limits>
<limit>
<counter>LINE</counter>
<value>COVEREDRATIO</value>
<minimum>0.90</minimum>
</limit>
</limits>
</rule>
</rules>
</configuration>
</execution>
</executions>
</plugin>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment