pick from jacoco.xml 62/100162/1
authorTaka Cho <takamune.cho@att.com>
Thu, 9 Jan 2020 22:13:06 +0000 (17:13 -0500)
committerTaka Cho <takamune.cho@att.com>
Thu, 9 Jan 2020 22:13:52 +0000 (17:13 -0500)
add sonar config in pom file

Issue-ID: APPC-1808
Change-Id: I58d2ff0de74506a8c5021649af4b0f730b370e34
Signed-off-by: Taka Cho <takamune.cho@att.com>
services/appc-dmaap-service/appc-dmaap-event-service/pom.xml

index 5e162d7..6fb8f86 100644 (file)
         <artifactId>spring-boot-starter-parent</artifactId>
         <version>2.1.6.RELEASE</version>
     </parent>
+    <properties>
+       <!-- SONAR -->
+        <sonar.language>java</sonar.language>
+        <sonar.surefire.reportsPath>${project.build.directory}/surefire-reports</sonar.surefire.reportsPath>
+        <sonar.coverage.jacoco.xmlReportPaths>
+            ${project.reporting.outputDirectory}/jacoco-ut/jacoco.xml
+        </sonar.coverage.jacoco.xmlReportPaths>
+        <sonar.projectVersion>${project.version}</sonar.projectVersion>
+        <sonar.dynamicAnalysis>reuseReports</sonar.dynamicAnalysis>
+    </properties>
     <distributionManagement>
         <repository>
             <id>ecomp-releases</id>
                 <groupId>org.springframework.boot</groupId>
                 <artifactId>spring-boot-maven-plugin</artifactId>
             </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}/jacoco.exec</dataFile>
+                        <outputDirectory>${project.reporting.outputDirectory}/jacoco-ut</outputDirectory>
+                     </configuration>
+                  </execution>
+               </executions>
+            </plugin>
         </plugins>
     </build>
 </project>