update pom for java sonar code coverage 55/112055/1
authorKotagiri, Ramprasad (rp5662) <rp5662@att.com>
Wed, 2 Sep 2020 16:29:59 +0000 (12:29 -0400)
committerKotagiri, Ramprasad (rp5662) <rp5662@att.com>
Wed, 2 Sep 2020 16:30:12 +0000 (12:30 -0400)
Issue-ID: DCAEGEN2-2298

Change-Id: I60a15e6f9c3fd45a60f0dfd037d1f99833422717
Signed-off-by: Kotagiri, Ramprasad (rp5662) <rp5662@att.com>
ccsdk-app-common/pom.xml
pom.xml

index 3266c22..95abf22 100644 (file)
                <releaseNexusPath>content/repositories/releases/</releaseNexusPath>
                <stagingNexusPath>/content/repositories/staging/</stagingNexusPath>
                <skipTests>false</skipTests>
-               <jacocoVersion>0.7.6.201602180812</jacocoVersion>
                <jackson.version>2.9.8</jackson.version>
                <sonar.coverage.jacoco.xmlReportPaths> 
-                       ${project.reporting.outputDirectory}/jacoco-ut/jacoco.xml 
+                       ${project.reporting.outputDirectory}/jacoco-ut/jacoco.xml
        </sonar.coverage.jacoco.xmlReportPaths>
        </properties>
 
                                        </archive>
                                </configuration>
                        </plugin>
-
-                       <!-- Generate javadoc jar; see profile for Java 8 -->
-                       <!--
-                       <plugin>
-                               <groupId>org.apache.maven.plugins</groupId>
-                               <artifactId>maven-javadoc-plugin</artifactId>
-                               <version>2.10.3</version>
-                               <executions>
-                                       <execution>
-                                               <id>attach-javadocs</id>
-                                               <goals>
-                                                       <goal>jar</goal>
-                                               </goals>
-                                       </execution>
-                               </executions>
-                       </plugin>
-                       -->
-                       <!-- Generate source jar -->
-                       <!--  
-                       <plugin>
-                               <groupId>org.apache.maven.plugins</groupId>
-                               <artifactId>maven-source-plugin</artifactId>
-                               <version>3.0.0</version>
-                               <executions>
-                                       <execution>
-                                               <id>attach-sources</id>
-                                               <goals>
-                                                       <goal>jar</goal>
-                                               </goals>
-                                       </execution>
-                               </executions>
-                       </plugin>
-                       -->
-                       <!-- jacoco -->
-                       <plugin>
-                               <groupId>org.jacoco</groupId>
-                               <artifactId>jacoco-maven-plugin</artifactId>
-                               <executions>
-                                       <execution>
-                                               <id>prepare-agent</id>
-                                               <goals>
-                                                       <goal>prepare-agent</goal>
-                                               </goals>
-                                               <configuration>
-                                                       <destFile>${project.build.directory}/code-coverage/jacoco-ut.exec</destFile>
-                                               </configuration>
-                                       </execution>
-                                       <execution>
-                                               <id>post-unit-test</id>
-                                               <phase>test</phase>
-                                               <goals>
-                                                       <goal>report</goal>
-                                               </goals>
-                                               <configuration>
-                                                       <dataFile>${project.build.directory}/code-coverage/jacoco-ut.exec</dataFile>
-                                                       <outputDirectory>${project.basedir}/target/site/jacoco</outputDirectory>
-                                               </configuration>
-                                       </execution>
-                               </executions>
-                       </plugin>
-                       <plugin>
-                               <groupId>org.apache.maven.plugins</groupId>
-                               <artifactId>maven-surefire-plugin</artifactId>
-                               <configuration>
-                                       <systemPropertyVariables>
-                                               <jacoco-agent.destfile>${project.build.directory}/code-coverage/jacoco-ut.exec</jacoco-agent.destfile>
-                                       </systemPropertyVariables>
-                                       <argLine>
-                                       --illegal-access=permit
-                                       </argLine>
-                               </configuration>
-                       </plugin>
                </plugins>
        </build>
-
        <dependencies>
                <dependency>
                    <groupId>javax.annotation</groupId>
                        <artifactId>spring-webmvc</artifactId>
                        <version>${springframework.version}</version>
                </dependency>
-               <!-- Jacoco for offline instrumentation -->
                <dependency>
                        <groupId>org.jacoco</groupId>
                        <artifactId>org.jacoco.agent</artifactId>
-                       <version>${jacocoVersion}</version>
-                       <classifier>runtime</classifier>
+                       <version>${jacoco.version}</version>
+                       <scope>test</scope>
                </dependency>
+
        </dependencies>
 
        <!-- no distributionManagement section; no jars pushed to Maven central -->
diff --git a/pom.xml b/pom.xml
index 1d23436..180e0dc 100644 (file)
--- a/pom.xml
+++ b/pom.xml
@@ -23,9 +23,6 @@
         <sonar.exclusions>**/external/**</sonar.exclusions>
         <maven.compiler.source>11</maven.compiler.source>
         <maven.compiler.target>11</maven.compiler.target>
-        <sonar.coverage.jacoco.xmlReportPaths> 
-                       ${project.reporting.outputDirectory}/jacoco-ut/jacoco.xml 
-       </sonar.coverage.jacoco.xmlReportPaths>
     </properties>
 
     <modules>