From 84beaf8d12f1badc27b4744a4949f8a586370ea9 Mon Sep 17 00:00:00 2001 From: ramverma Date: Wed, 15 Aug 2018 21:28:42 +0100 Subject: [PATCH] Fix sonar code coverage issue in distribution The jacoco plugin settings in oparent is for creating coverage report for each sub-module sepeartely. That leads to coverage missing in the report if the test cases & actual classes are in different sub-module. Overiding the setting in distribution to create a consolidated report of all sub-modules in one report. Change-Id: Idf4acd07dbb3694d7bff3c1d94a31a322d7027c5 Issue-ID: POLICY-1035 Signed-off-by: ramverma --- pom.xml | 93 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 88 insertions(+), 5 deletions(-) diff --git a/pom.xml b/pom.xml index 1107c618..3301082c 100644 --- a/pom.xml +++ b/pom.xml @@ -19,14 +19,14 @@ --> - 4.0.0 + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> + 4.0.0 org.onap.policy.parent integration 2.0.0-SNAPSHOT - + org.onap.policy.distribution @@ -37,6 +37,15 @@ policy-distribution Code that implements our integration with SDC service distribution API. + + + + ${project.basedir}/../target/code-coverage/jacoco-ut.exec + ${project.basedir}/../target/code-coverage/jacoco-it.exec + reuseReports + + model main @@ -72,9 +81,83 @@ - ecomp-site - dav:${nexusproxy}${sitePath} + ecomp-site + dav:${nexusproxy}${sitePath} + + + + org.jacoco + jacoco-maven-plugin + + + pre-unit-test + + prepare-agent + + + ${sonar.jacoco.reportPath} + true + + + + post-unit-test + test + + report + + + ${sonar.jacoco.reportPath} + + + + + + + + + org.jacoco + jacoco-maven-plugin + ${jacoco.version} + + + + **/gen/** + **/generated-sources/** + **/yang-gen/** + **/pax/** + + + + + + pre-unit-test + + prepare-agent + + + ${sonar.jacoco.reportPath} + + + + + post-unit-test + test + + report + + + ${sonar.jacoco.reportPath} + + + + + + + -- 2.16.6