Skip to content

Commit

Permalink
Add jacoco plugin (#11)
Browse files Browse the repository at this point in the history
Configures jacoco plugin to measure code coverage
  • Loading branch information
mazenmelouk authored Feb 11, 2024
1 parent 3066ced commit d8f0f00
Showing 1 changed file with 50 additions and 0 deletions.
50 changes: 50 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,56 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.8</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>jacoco-check</id>
<goals>
<goal>check</goal>
</goals>
<configuration>
<rules>
<rule>
<element>CLASS</element>
<limits>
<limit>
<counter>LINE</counter>
<value>COVEREDRATIO</value>
<minimum>0.999</minimum>
</limit>
<limit>
<counter>BRANCH</counter>
<value>COVEREDRATIO</value>
<minimum>0.999</minimum>
</limit>
</limits>
<excludes>
<exclude>com.melouk.personal.CurrencyExchangeApplication</exclude>
<exclude>com.melouk.personal.config.*</exclude>
<exclude>com.melouk.personal.data.ExchangeRateRecord</exclude>
</excludes>
</rule>
</rules>
</configuration>
</execution>

</executions>
</plugin>
</plugins>
</build>
</project>

0 comments on commit d8f0f00

Please sign in to comment.