Fix SONAR Jacoco plugin
Issue-ID: VID-60
Change-Id: Id0b99f24be5dcc7fa7d925b7cb02547d4221374d
Signed-off-by: Ofir Sonsino <os0695@att.com>
diff --git a/epsdk-app-onap/pom.xml b/epsdk-app-onap/pom.xml
index e9f4225..0fb1e2b 100755
--- a/epsdk-app-onap/pom.xml
+++ b/epsdk-app-onap/pom.xml
@@ -34,7 +34,7 @@
<sonar.language>java</sonar.language>
<sonar.java.coveragePlugin>jacoco</sonar.java.coveragePlugin>
<sonar.surefire.reportsPath>${project.build.directory}/surefire-reports</sonar.surefire.reportsPath>
- <sonar.jacoco.reportPath>${project.build.directory}/code-coverage/jacoco-ut.exec</sonar.jacoco.reportPath>
+ <sonar.jacoco.reportPath>${project.build.directory}/code-coverage/jacoco.exec</sonar.jacoco.reportPath>
<sonar.jacoco.reportMissing.force.zero>true</sonar.jacoco.reportMissing.force.zero>
<sonar.projectVersion>${project.version}</sonar.projectVersion>
</properties>
@@ -223,6 +223,25 @@
<artifactId>sonar-maven-plugin</artifactId>
<version>3.2</version>
</plugin>
+ <plugin>
+ <groupId>org.jacoco</groupId>
+ <artifactId>jacoco-maven-plugin</artifactId>
+ <version>0.7.7.201606060606</version>
+ <configuration>
+ <dumpOnExit>true</dumpOnExit>
+ </configuration>
+ <executions>
+ <execution>
+ <id>jacoco-initialize-unit-tests</id>
+ <goals>
+ <goal>prepare-agent</goal>
+ </goals>
+ <configuration>
+ <destFile>${project.build.directory}/coverage-reports/jacoco.exec</destFile>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
</plugins>
</build>