aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrenealr <reneal.rogers@amdocs.com>2019-04-05 13:41:48 -0400
committerrenealr <reneal.rogers@amdocs.com>2019-04-05 13:46:37 -0400
commitcecd2f4528f1ef7e686a6dfd1e3bcd8580641048 (patch)
tree9ad02ce64f016cd974e4e70fc59e32c0bbed803e
parent00597545b8792b6fb9825527bdc4fbb4e70b8df1 (diff)
set the code coverage limit check
Issue-ID: AAI-2321 Change-Id: Ib363bbec09a2f9eea8bc62dd871bb7d6254fcc9b Signed-off-by: renealr <reneal.rogers@amdocs.com>
-rw-r--r--pom.xml25
1 files changed, 24 insertions, 1 deletions
diff --git a/pom.xml b/pom.xml
index 251e63c..752b5c9 100644
--- a/pom.xml
+++ b/pom.xml
@@ -42,6 +42,7 @@
<sonar.jacoco.reportPath>${project.build.directory}/code-coverage/jacoco-ut.exec</sonar.jacoco.reportPath>
<sonar.jacoco.reportMissing.force.zero>false</sonar.jacoco.reportMissing.force.zero>
<sonar.projectVersion>${project.version}</sonar.projectVersion>
+ <jacoco.line.coverage.limit>0.84</jacoco.line.coverage.limit>
</properties>
<dependencies>
@@ -173,7 +174,7 @@
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.7.7.201606060606</version>
<configuration>
- <dumpOnExit>true</dumpOnExit>
+ <dumpOnExit>true</dumpOnExit>
</configuration>
<executions>
<execution>
@@ -186,6 +187,28 @@
<!-- <append>true</append> -->
</configuration>
</execution>
+ <execution>
+ <id>default-check</id>
+ <goals>
+ <goal>check</goal>
+ </goals>
+ <configuration>
+ <dataFile>${project.build.directory}/code-coverage/jacoco-ut.exec</dataFile>
+ <rules>
+ <!-- implementation is needed only for Maven 2 -->
+ <rule implementation="org.jacoco.maven.RuleConfiguration">
+ <element>BUNDLE</element>
+ <limits>
+ <limit implementation="org.jacoco.report.check.Limit">
+ <counter>LINE</counter>
+ <value>COVEREDRATIO</value>
+ <minimum>${jacoco.line.coverage.limit}</minimum>
+ </limit>
+ </limits>
+ </rule>
+ </rules>
+ </configuration>
+ </execution>
</executions>
</plugin>