Include aggregate xml report on sonar coverage
[cps.git] / cps-parent / pom.xml
old mode 100644 (file)
new mode 100755 (executable)
index 08b1883..b426751
         <base.image>openjdk:11-jre-slim</base.image>
         <java.version>11</java.version>
         <jib-maven-plugin.version>2.6.0</jib-maven-plugin.version>
-        <minimum-coverage>0.44</minimum-coverage>
+        <minimum-coverage>0.76</minimum-coverage>
         <nexusproxy>https://nexus.onap.org</nexusproxy>
         <oparent.version>3.1.0</oparent.version>
         <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>
                 <groupId>com.github.spotbugs</groupId>
                 <artifactId>spotbugs-maven-plugin</artifactId>
             </plugin>
+            <plugin>
+                <groupId>org.sonarsource.scanner.maven</groupId>
+                <artifactId>sonar-maven-plugin</artifactId>
+            </plugin>
         </plugins>
     </build>
 </project>
\ No newline at end of file