Report code coverage of A1 controller to Sonar
Change-Id: I20281a64df0e242e973fa3e0ac17d5e955a4de8b
Issue-ID: NONRTRIC-116
Signed-off-by: RehanRaza <muhammad.rehan.raza@est.tech>
diff --git a/sdnc-a1-controller/northbound/nonrt-ric-api/pom.xml b/sdnc-a1-controller/northbound/nonrt-ric-api/pom.xml
index f95e491..44b02e2 100644
--- a/sdnc-a1-controller/northbound/nonrt-ric-api/pom.xml
+++ b/sdnc-a1-controller/northbound/nonrt-ric-api/pom.xml
@@ -36,10 +36,26 @@
<packaging>pom</packaging>
<name>sdnc-northbound :: nonrt-ric-api</name>
+
+ <properties>
+ <sonar-maven-plugin.version>3.7.0.1746</sonar-maven-plugin.version>
+ </properties>
+
<modules>
<module>model</module>
<module>provider</module>
<module>features</module>
<module>installer</module>
</modules>
+
+ <build>
+ <plugins>
+ <!-- support sonar in multi-module project -->
+ <plugin>
+ <groupId>org.sonarsource.scanner.maven</groupId>
+ <artifactId>sonar-maven-plugin</artifactId>
+ <version>${sonar-maven-plugin.version}</version>
+ </plugin>
+ </plugins>
+ </build>
</project>
diff --git a/sdnc-a1-controller/northbound/nonrt-ric-api/provider/pom.xml b/sdnc-a1-controller/northbound/nonrt-ric-api/provider/pom.xml
index eece2d1..e3c7ab9 100644
--- a/sdnc-a1-controller/northbound/nonrt-ric-api/provider/pom.xml
+++ b/sdnc-a1-controller/northbound/nonrt-ric-api/provider/pom.xml
@@ -50,7 +50,25 @@
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
- <version>0.8.2</version>
+ <version>0.8.4</version>
+ <configuration>
+ <dataFile>${project.build.directory}/code-coverage/jacoco.exec</dataFile>
+ </configuration>
+ <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>org.apache.maven.plugins</groupId>