aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTian Lee <TianL@amdocs.com>2019-04-01 13:22:55 +0000
committerGerrit Code Review <gerrit@onap.org>2019-04-01 13:22:55 +0000
commit86e2176caad215b18c5b41aec428a2632afafd55 (patch)
tree5b6e1f8350543bfe8d52929c339df73c8b4dde46
parent8594ff7912ea68555b816985caedcb3383e93953 (diff)
parent0be06219ae5d78933e2305e4325d7f5c7accdfbb (diff)
Merge "Configure Jacoco plugin to enforce min coverage"
-rw-r--r--pom.xml34
1 files changed, 33 insertions, 1 deletions
diff --git a/pom.xml b/pom.xml
index f14e721..3044d66 100644
--- a/pom.xml
+++ b/pom.xml
@@ -41,6 +41,10 @@ limitations under the License.
<version.org.onap.aai.aai-utils>1.4.0</version.org.onap.aai.aai-utils>
<version.org.onap.aai.aai-auth>1.4.0</version.org.onap.aai.aai-auth>
<event.client.version>1.3.1</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.60</jacoco.line.coverage.limit>
+ <jacoco.report.directory>${project.build.directory}/code-coverage</jacoco.report.directory>
</properties>
<dependencyManagement>
@@ -540,7 +544,35 @@ limitations under the License.
</execution>
</executions>
</plugin>
- </plugins>
+ <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>
<distributionManagement>