Include aggregate xml report on sonar coverage
[cps.git] / cps-parent / pom.xml
index 60aad03..b426751 100755 (executable)
@@ -26,6 +26,7 @@
         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
         <releaseNexusPath>/content/repositories/releases/</releaseNexusPath>
         <repository.name>nexus3.onap.org:10001/onap/cps-service</repository.name>
+        <sonar.coverage.jacoco.xmlReportPaths>${project.reporting.outputDirectory}/jacoco-aggregate/jacoco.xml,${project.reporting.outputDirectory}/jacoco-ut/jacoco.xml</sonar.coverage.jacoco.xmlReportPaths>
         <spotbugs-maven-plugin.version>4.1.3</spotbugs-maven-plugin.version>
         <spring-boot-maven-plugin.version>2.3.3.RELEASE</spring-boot-maven-plugin.version>
         <spotbugs.slf4j.version>1.8.0-beta4</spotbugs.slf4j.version>
                             </rules>
                         </configuration>
                     </execution>
+                    <execution>
+                        <id>report</id>
+                        <goals>
+                            <goal>report-aggregate</goal>
+                        </goals>
+                        <phase>verify</phase>
+                        <configuration>
+                            <dataFileIncludes>
+                                <fileInclude>**/code-coverage/jacoco-ut.exec</fileInclude>
+                            </dataFileIncludes>
+                        </configuration>
+                    </execution>
                 </executions>
             </plugin>
             <plugin>