plugin: pom.xml: enable jacoco support

This commit is contained in:
Paul Campbell 2017-05-26 17:13:34 +01:00
parent 92e9a289fa
commit 3549014a03

View file

@ -30,6 +30,10 @@
<mojo-executor.version>2.3.0</mojo-executor.version>
<lombok.version>1.16.16</lombok.version>
<map-builder.version>1.0.0</map-builder.version>
<jacoco-maven-plugin.version>0.7.9</jacoco-maven-plugin.version>
<jacoco-class-line-covered-ratio>0.50</jacoco-class-line-covered-ratio>
<jacoco-class-instruction-covered-ratio>0.80</jacoco-class-instruction-covered-ratio>
<jacoco-class-missed-count-maximum>0</jacoco-class-missed-count-maximum>
</properties>
<dependencies>
@ -106,6 +110,58 @@
<target>1.8</target>
</configuration>
</plugin><!-- maven-compiler-plugin -->
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>${jacoco-maven-plugin.version}</version>
<executions>
<execution>
<goals>
<goal>prepare-agent</goal>
</goals>
</execution>
<execution>
<id>report</id>
<phase>prepare-package</phase>
<goals>
<goal>report</goal>
</goals>
</execution>
<execution>
<id>default-check</id>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
<configuration>
<rules>
<rule>
<element>CLASS</element>
<excludes>
<exclude>*HelpMojo</exclude>
</excludes>
<limits>
<limit>
<counter>LINE</counter>
<value>COVEREDRATIO</value>
<minimum>${jacoco-class-line-covered-ratio}</minimum>
</limit>
<limit>
<counter>INSTRUCTION</counter>
<value>COVEREDRATIO</value>
<minimum>${jacoco-class-instruction-covered-ratio}</minimum>
</limit>
<limit>
<counter>CLASS</counter>
<value>MISSEDCOUNT</value>
<maximum>${jacoco-class-missed-count-maximum}</maximum>
</limit>
</limits>
</rule>
</rules>
</configuration>
</plugin><!-- jacoco-maven-plugin -->
</plugins>
</build>
<profiles>