aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjjia <Jennie.Jia@amdocs.com>2019-04-05 14:51:26 -0400
committerjjia <Jennie.Jia@amdocs.com>2019-04-05 14:52:09 -0400
commit6b34334fa325f710093eacb82196c591e6e4e5c9 (patch)
treeaeadccd138ae88ac9a267136bbf84d16eb604845
parentc48523f7e3aa7eb2f17f71448d679335dc395099 (diff)
Set Jacoco coverage limit
Issue-ID: AAI-2247 Change-Id: Ib0c82e67dc1bf5b2a9304a5adeb8f705f8422256 Signed-off-by: jjia <Jennie.Jia@amdocs.com>
-rw-r--r--pom.xml33
1 files changed, 24 insertions, 9 deletions
diff --git a/pom.xml b/pom.xml
index 95432b2..e2a448b 100644
--- a/pom.xml
+++ b/pom.xml
@@ -43,6 +43,7 @@ limitations under the License.
<sonar.jacoco.reportMissing.force.zero>false</sonar.jacoco.reportMissing.force.zero>
<sonar.projectVersion>${project.version}</sonar.projectVersion>
<camel-spring-boot.version>2.22.1</camel-spring-boot.version>
+ <jacoco.line.coverage.limit>0.71</jacoco.line.coverage.limit>
</properties>
<dependencies>
<dependency>
@@ -234,16 +235,30 @@ limitations under the License.
<dumpOnExit>true</dumpOnExit>
</configuration>
<executions>
+
<execution>
- <id>jacoco-initialize-unit-tests</id>
- <goals>
- <goal>prepare-agent</goal>
- </goals>
- <configuration>
- <destFile>${project.build.directory}/coverage-reports/jacoco.exec</destFile>
- <!-- <append>true</append> -->
- </configuration>
- </execution>
+ <id>default-check</id>
+ <goals>
+ <goal>check</goal>
+ </goals>
+ <configuration>
+ <dataFile>${sonar.jacoco.reportPath}</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>
</plugins>