summaryrefslogtreecommitdiffstats
path: root/pom.xml
diff options
context:
space:
mode:
authorRavi Geda <gravik@amdocs.com>2019-04-01 13:27:57 +0100
committerTian Lee <TianL@amdocs.com>2019-04-01 13:22:28 +0000
commit0338683186c994d579b1ec297604dba59df73dff (patch)
treec40c89b73ced319ec7ed614242c9f4f6c7b60c66 /pom.xml
parent2587d778f8f2894b9abc60c5ac22c7f8bab5d71d (diff)
Enforce minimum Jacoco line coverage
Change-Id: I27e1cf95384ebe5213f4a0f082a1a4360af2675c Issue-ID: AAI-2305 Signed-off-by: Ravi Geda <gravik@amdocs.com>
Diffstat (limited to 'pom.xml')
-rwxr-xr-xpom.xml32
1 files changed, 32 insertions, 0 deletions
diff --git a/pom.xml b/pom.xml
index ddb677b..7084bf3 100755
--- a/pom.xml
+++ b/pom.xml
@@ -37,6 +37,10 @@ limitations under the License.
<properties>
<onap.nexus.url>https://nexus.onap.org</onap.nexus.url>
<event.client.version>1.4.0-SNAPSHOT</event.client.version>
+ <!-- Minimum code coverage percentage. Please update this figure as coverage increases to prevent any drops in
+ coverage caused by new changes. Note that this figure cannot be lower than the ONAP requirement of 0.55 -->
+ <jacoco.line.coverage.limit>0.57</jacoco.line.coverage.limit>
+ <jacoco.report.directory>${project.build.directory}/code-coverage</jacoco.report.directory>
</properties>
<modules>
@@ -55,6 +59,34 @@ limitations under the License.
<skip>true</skip>
</configuration>
</plugin>
+ <plugin>
+ <groupId>org.jacoco</groupId>
+ <artifactId>jacoco-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>default-check</id>
+ <goals>
+ <goal>check</goal>
+ </goals>
+ <configuration>
+ <dataFile>${jacoco.report.directory}/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>
</plugins>
</build>