Add support in pom for code coverage

Change-Id: Ic91c8c3c76e1960d74b4347a88777116c6b3db29
Issue-ID: NONRTRIC-287
Signed-off-by: elinuxhenrik <henrik.b.andersson@est.tech>
diff --git a/r-app-catalogue/pom.xml b/r-app-catalogue/pom.xml
index ea36b58..a2a2dfc 100644
--- a/r-app-catalogue/pom.xml
+++ b/r-app-catalogue/pom.xml
@@ -45,6 +45,7 @@
         <jackson-databind-nullable.version>0.2.1</jackson-databind-nullable.version>

         <openapi-generator-maven-plugin.version>4.3.1</openapi-generator-maven-plugin.version>

         <swagger-codegen-maven-plugin.version>3.0.11</swagger-codegen-maven-plugin.version>

+        <jacoco-maven-plugin.version>0.8.6</jacoco-maven-plugin.version>

         <docker-maven-plugin.version>0.30.0</docker-maven-plugin.version>

     </properties>

 

@@ -200,6 +201,26 @@
                 </executions>

             </plugin>

             <plugin>

+                <groupId>org.jacoco</groupId>

+                <artifactId>jacoco-maven-plugin</artifactId>

+                <version>${jacoco-maven-plugin.version}</version>

+                <executions>

+                    <execution>

+                        <id>default-prepare-agent</id>

+                        <goals>

+                            <goal>prepare-agent</goal>

+                        </goals>

+                    </execution>

+                    <execution>

+                        <id>default-report</id>

+                        <phase>prepare-package</phase>

+                        <goals>

+                            <goal>report</goal>

+                        </goals>

+                    </execution>

+                </executions>

+            </plugin>

+            <plugin>

                 <groupId>io.fabric8</groupId>

                 <artifactId>docker-maven-plugin</artifactId>

                 <version>${docker-maven-plugin.version}</version>