Improve SONAR coverage
Change-Id: I02e9535f96040cd038ef064ee5881c4c3e5e7bca
Issue-ID: VID-72
Signed-off-by: Ofir Sonsino <os0695@att.com>
diff --git a/epsdk-app-onap/pom.xml b/epsdk-app-onap/pom.xml
index 1dc9341..4a3da03 100755
--- a/epsdk-app-onap/pom.xml
+++ b/epsdk-app-onap/pom.xml
@@ -23,20 +23,18 @@
<!-- Skip assembling the zip; assemble via mvn -Dskipassembly=false .. -->
<skipassembly>true</skipassembly>
<!-- Tests usually require some setup that maven cannot do, so skip. -->
- <skiptests>true</skiptests>
+ <skiptests>false</skiptests>
<nexusproxy>https://nexus.onap.org</nexusproxy>
<snapshotNexusPath>/content/repositories/snapshots/</snapshotNexusPath>
<releaseNexusPath>/content/repositories/releases/</releaseNexusPath>
<stagingNexusPath>/content/repositories/staging/</stagingNexusPath>
<sitePath>/content/sites/site/org/openecomp/vid/${project.version}</sitePath>
-
+
<!-- SONAR -->
- <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.exec</sonar.jacoco.reportPath>
- <sonar.jacoco.reportMissing.force.zero>true</sonar.jacoco.reportMissing.force.zero>
- <sonar.projectVersion>${project.version}</sonar.projectVersion>
+ <sonar.language>java</sonar.language>
+ <sonar.java.coveragePlugin>jacoco</sonar.java.coveragePlugin>
+ <sonar.surefire.reportsPath>${project.build.directory}/surefire-reports</sonar.surefire.reportsPath>
+ <sonar.projectVersion>${project.version}</sonar.projectVersion>
</properties>
<repositories>
@@ -213,49 +211,36 @@
</dependency>
</dependencies>
</plugin>
-
+
<plugin>
- <artifactId>maven-surefire-plugin</artifactId>
- <version>2.17</version>
- </plugin>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <version>2.17</version>
+ </plugin>
<plugin>
- <groupId>org.sonarsource.scanner.maven</groupId>
- <artifactId>sonar-maven-plugin</artifactId>
- <version>3.2</version>
- </plugin>
+ <groupId>org.sonarsource.scanner.maven</groupId>
+ <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>
+ <version>0.7.9</version>
<executions>
<execution>
- <id>jacoco-initialize-unit-tests</id>
+ <id>default-prepare-agent</id>
<goals>
<goal>prepare-agent</goal>
</goals>
- <configuration>
- <destFile>${project.build.directory}/coverage-reports/jacoco.exec</destFile>
- </configuration>
</execution>
- <!-- Ensures that the code coverage report for unit tests is created after unit tests have been run. -->
- <execution>
- <id>post-unit-test</id>
- <phase>test</phase>
- <goals>
- <goal>report</goal>
- </goals>
- <configuration>
- <!-- Sets the path to the file which contains the execution data. -->
- <dataFile>${sonar.jacoco.reportPath}</dataFile>
- <!-- Sets the output directory for the code coverage report. -->
- <outputDirectory>${project.build.directory}/jacoco_report</outputDirectory>
- </configuration>
- </execution>
+ <execution>
+ <id>default-report</id>
+ <goals>
+ <goal>report</goal>
+ </goals>
+ </execution>
</executions>
</plugin>
+
</plugins>
</build>