SonarCloud migration fix 63/103063/1
authorefiacor <fiachra.corcoran@est.tech>
Wed, 4 Mar 2020 20:43:51 +0000 (20:43 +0000)
committerefiacor <fiachra.corcoran@est.tech>
Wed, 4 Mar 2020 20:43:57 +0000 (20:43 +0000)
Signed-off-by: efiacor <fiachra.corcoran@est.tech>
Change-Id: Ieea0d8b5b81a8bad37f6fb0ed2d6ba2fe95d8949
Issue-ID: DMAAP-1402

pom.xml

diff --git a/pom.xml b/pom.xml
index 796c130..4bd7bbb 100755 (executable)
--- a/pom.xml
+++ b/pom.xml
 
         <sonar.language>java</sonar.language>
         <sonar.skip>false</sonar.skip>
-        <sonar.java.coveragePlugin>jacoco</sonar.java.coveragePlugin>
         <sonar.surefire.reportsPath>${project.build.directory}/surefire-reports</sonar.surefire.reportsPath>
-        <sonar.jacoco.reportPaths>${project.build.directory}/coverage-reports/jacoco.exec</sonar.jacoco.reportPaths>
-        <sonar.jacoco.itReportPath>${project.build.directory}/coverage-reports/jacoco-it.exec</sonar.jacoco.itReportPath>
+        <sonar.coverage.jacoco.xmlReportPaths>${project.reporting.outputDirectory}/jacoco-ut/jacoco.xml</sonar.coverage.jacoco.xmlReportPaths>
         <sonar.projectVersion>${project.version}</sonar.projectVersion>
 
         <docker.skip.build>false</docker.skip.build>
                         </execution>
                     </executions>
                 </plugin>
+                <plugin>
+                    <groupId>org.jacoco</groupId>
+                    <artifactId>jacoco-maven-plugin</artifactId>
+                    <executions>
+                        <execution>
+                            <id>prepare-agent</id>
+                            <goals>
+                                <goal>prepare-agent</goal>
+                            </goals>
+                        </execution>
+                        <execution>
+                            <id>report</id>
+                            <goals>
+                                <goal>report</goal>
+                            </goals>
+                            <configuration>
+                                <dataFile>${project.build.directory}/code-coverage/jacoco.exec</dataFile>
+                                <outputDirectory>${project.reporting.outputDirectory}/jacoco-ut</outputDirectory>
+                            </configuration>
+                        </execution>
+                    </executions>
+                </plugin>
             </plugins>
         </pluginManagement>
     </build>