Improve code coverage for aaf cadi modules 23/16823/1
authorsg481n <sg481n@att.com>
Mon, 2 Oct 2017 04:27:49 +0000 (04:27 +0000)
committersg481n <sg481n@att.com>
Mon, 2 Oct 2017 04:27:54 +0000 (04:27 +0000)
Issue-ID: AAF-79
Change-Id: I3ff6a0ffba6f8777d0972aca3f74c2c8cfe4f8cb
Signed-off-by: sg481n <sg481n@att.com>
aaf/pom.xml
cass/pom.xml
client/pom.xml
core/pom.xml
pom.xml

index a611575..cf9f99e 100644 (file)
        <properties>\r
                <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>\r
                <project.cadiVersion>1.0.0-SNAPSHOT</project.cadiVersion>\r
-               <sonar.language>java</sonar.language>\r
-               <sonar.java.coveragePlugin>jacoco</sonar.java.coveragePlugin>\r
-               <sonar.surefire.reportsPath>${project.build.directory}/surefire-reports</sonar.surefire.reportsPath>\r
-               <sonar.jacoco.reportPath>${project.build.directory}/coverage-reports/jacoco.exec</sonar.jacoco.reportPath>\r
-               <sonar.jacoco.itReportPath>${project.build.directory}/coverage-reports/jacoco-it.exec</sonar.jacoco.itReportPath>\r
-               <sonar.jacoco.reportMissing.force.zero>true</sonar.jacoco.reportMissing.force.zero>\r
-               <sonar.projectVersion>${project.version}</sonar.projectVersion>\r
+               <!--  SONAR  -->\r
+                <jacoco.version>0.7.7.201606060606</jacoco.version>\r
+           <sonar-jacoco-listeners.version>3.2</sonar-jacoco-listeners.version>\r
+           <sonar.core.codeCoveragePlugin>jacoco</sonar.core.codeCoveragePlugin>\r
+           <!-- Default Sonar configuration -->\r
+           <sonar.jacoco.reportPath>target/code-coverage/jacoco-ut.exec</sonar.jacoco.reportPath>\r
+           <sonar.jacoco.itReportPath>target/code-coverage/jacoco-it.exec</sonar.jacoco.itReportPath>\r
+           <!-- Note: This list should match jacoco-maven-plugin's exclusion list below -->\r
+           <sonar.exclusions>**/gen/**,**/generated-sources/**,**/yang-gen**,**/pax/**</sonar.exclusions>\r
         <nexusproxy>https://nexus.onap.org</nexusproxy>\r
                <snapshotNexusPath>/content/repositories/snapshots/</snapshotNexusPath>\r
                <releaseNexusPath>/content/repositories/releases/</releaseNexusPath>\r
                        </plugin> \r
                        \r
                        <plugin>\r
-                               <groupId>org.jacoco</groupId>\r
-                               <artifactId>jacoco-maven-plugin</artifactId>\r
-                               <version>0.7.7.201606060606</version>\r
-                               <configuration>\r
-                                       <dumpOnExit>true</dumpOnExit>\r
-                                       <includes>\r
-                                               <include>org.onap.aaf.*</include>\r
-                                       </includes>\r
-                               </configuration>\r
-                               <executions>\r
-                                       <execution>\r
-                                               <id>pre-unit-test</id>\r
-                                               <goals>\r
-                                                       <goal>prepare-agent</goal>\r
-                                               </goals>\r
-                                               <configuration>\r
-                                                       <destFile>${project.build.directory}/coverage-reports/jacoco.exec</destFile>\r
-                                                       <!-- <append>true</append> -->\r
-                                               </configuration>\r
-                                       </execution>\r
-                                       <execution>\r
-                                               <id>pre-integration-test</id>\r
-                                               <phase>pre-integration-test</phase>\r
-                                               <goals>\r
-                                                       <goal>prepare-agent</goal>\r
-                                               </goals>\r
-                                               <configuration>\r
-                                                       <destFile>${project.build.directory}/coverage-reports/jacoco-it.exec</destFile>\r
-                                                       <!-- <append>true</append> -->\r
-                                               </configuration>\r
-                                       </execution>\r
-                                       <execution>\r
-                        <goals>\r
-                            <goal>merge</goal>\r
-                        </goals>\r
-                        <phase>post-integration-test</phase>\r
-                        <configuration>\r
-                            <fileSets>\r
-                                <fileSet implementation="org.apache.maven.shared.model.fileset.FileSet">\r
-                                    <directory>${project.build.directory}/coverage-reports</directory>\r
-                                    <includes>\r
-                                        <include>*.exec</include>\r
-                                    </includes>\r
-                                </fileSet>\r
-                            </fileSets>\r
-                            <destFile>${project.build.directory}/jacoco-dev.exec</destFile>\r
-                        </configuration>\r
-                    </execution>\r
-                               </executions>\r
-                       </plugin>      \r
+          <groupId>org.jacoco</groupId>\r
+          <artifactId>jacoco-maven-plugin</artifactId>\r
+          <version>${jacoco.version}</version>\r
+          <configuration>\r
+            <excludes>\r
+              <exclude>**/gen/**</exclude>\r
+              <exclude>**/generated-sources/**</exclude>\r
+              <exclude>**/yang-gen/**</exclude>\r
+              <exclude>**/pax/**</exclude>\r
+            </excludes>\r
+          </configuration>\r
+          <executions>\r
+\r
+            <execution>\r
+              <id>pre-unit-test</id>\r
+              <goals>\r
+                <goal>prepare-agent</goal>\r
+              </goals>\r
+              <configuration>\r
+                <destFile>${project.build.directory}/code-coverage/jacoco-ut.exec</destFile>\r
+                <propertyName>surefireArgLine</propertyName>\r
+              </configuration>\r
+            </execution>\r
+            \r
+       \r
+            <execution>\r
+              <id>post-unit-test</id>\r
+              <phase>test</phase>\r
+              <goals>\r
+                <goal>report</goal>\r
+              </goals>\r
+              <configuration>\r
+                <dataFile>${project.build.directory}/code-coverage/jacoco-ut.exec</dataFile>\r
+                <outputDirectory>${project.reporting.outputDirectory}/jacoco-ut</outputDirectory>\r
+              </configuration>\r
+            </execution>\r
+            <execution>\r
+              <id>pre-integration-test</id>\r
+              <phase>pre-integration-test</phase>\r
+              <goals>\r
+                <goal>prepare-agent</goal>\r
+              </goals>\r
+              <configuration>\r
+                <destFile>${project.build.directory}/code-coverage/jacoco-it.exec</destFile>\r
+\r
+                <propertyName>failsafeArgLine</propertyName>\r
+              </configuration>\r
+            </execution>\r
+\r
+       \r
+            <execution>\r
+              <id>post-integration-test</id>\r
+              <phase>post-integration-test</phase>\r
+              <goals>\r
+                <goal>report</goal>\r
+              </goals>\r
+              <configuration>\r
+                <dataFile>${project.build.directory}/code-coverage/jacoco-it.exec</dataFile>\r
+                <outputDirectory>${project.reporting.outputDirectory}/jacoco-it</outputDirectory>\r
+              </configuration>\r
+            </execution>\r
+          </executions>\r
+        </plugin>      \r
 \r
                </plugins>\r
        </build>\r
index f217a22..b12ace5 100644 (file)
 <properties>\r
                <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>\r
                <project.cadiVersion>1.0.0-SNAPSHOT</project.cadiVersion>\r
-               <sonar.language>java</sonar.language>\r
-               <sonar.java.coveragePlugin>jacoco</sonar.java.coveragePlugin>\r
-               <sonar.surefire.reportsPath>${project.build.directory}/surefire-reports</sonar.surefire.reportsPath>\r
-               <sonar.jacoco.reportPath>${project.build.directory}/coverage-reports/jacoco.exec</sonar.jacoco.reportPath>\r
-               <sonar.jacoco.itReportPath>${project.build.directory}/coverage-reports/jacoco-it.exec</sonar.jacoco.itReportPath>\r
-               <sonar.jacoco.reportMissing.force.zero>true</sonar.jacoco.reportMissing.force.zero>\r
-               <sonar.projectVersion>${project.version}</sonar.projectVersion>\r
+               <!--  SONAR  -->\r
+                <jacoco.version>0.7.7.201606060606</jacoco.version>\r
+           <sonar-jacoco-listeners.version>3.2</sonar-jacoco-listeners.version>\r
+           <sonar.core.codeCoveragePlugin>jacoco</sonar.core.codeCoveragePlugin>\r
+           <!-- Default Sonar configuration -->\r
+           <sonar.jacoco.reportPath>target/code-coverage/jacoco-ut.exec</sonar.jacoco.reportPath>\r
+           <sonar.jacoco.itReportPath>target/code-coverage/jacoco-it.exec</sonar.jacoco.itReportPath>\r
+           <!-- Note: This list should match jacoco-maven-plugin's exclusion list below -->\r
+           <sonar.exclusions>**/gen/**,**/generated-sources/**,**/yang-gen**,**/pax/**</sonar.exclusions>\r
         <nexusproxy>https://nexus.onap.org</nexusproxy>\r
                <snapshotNexusPath>/content/repositories/snapshots/</snapshotNexusPath>\r
                <releaseNexusPath>/content/repositories/releases/</releaseNexusPath>\r
                                        <serverId>ecomp-staging</serverId>\r
                                </configuration>\r
                        </plugin> \r
-                       <plugin>\r
-                               <groupId>org.jacoco</groupId>\r
-                               <artifactId>jacoco-maven-plugin</artifactId>\r
-                               <version>0.7.7.201606060606</version>\r
-                               <configuration>\r
-                                       <dumpOnExit>true</dumpOnExit>\r
-                                       <includes>\r
-                                               <include>org.onap.aaf.*</include>\r
-                                       </includes>\r
-                               </configuration>\r
-                               <executions>\r
-                                       <execution>\r
-                                               <id>pre-unit-test</id>\r
-                                               <goals>\r
-                                                       <goal>prepare-agent</goal>\r
-                                               </goals>\r
-                                               <configuration>\r
-                                                       <destFile>${project.build.directory}/coverage-reports/jacoco.exec</destFile>\r
-                                                       <!-- <append>true</append> -->\r
-                                               </configuration>\r
-                                       </execution>\r
-                                       <execution>\r
-                                               <id>pre-integration-test</id>\r
-                                               <phase>pre-integration-test</phase>\r
-                                               <goals>\r
-                                                       <goal>prepare-agent</goal>\r
-                                               </goals>\r
-                                               <configuration>\r
-                                                       <destFile>${project.build.directory}/coverage-reports/jacoco-it.exec</destFile>\r
-                                                       <!-- <append>true</append> -->\r
-                                               </configuration>\r
-                                       </execution>\r
-                                       <execution>\r
-                        <goals>\r
-                            <goal>merge</goal>\r
-                        </goals>\r
-                        <phase>post-integration-test</phase>\r
-                        <configuration>\r
-                            <fileSets>\r
-                                <fileSet implementation="org.apache.maven.shared.model.fileset.FileSet">\r
-                                    <directory>${project.build.directory}/coverage-reports</directory>\r
-                                    <includes>\r
-                                        <include>*.exec</include>\r
-                                    </includes>\r
-                                </fileSet>\r
-                            </fileSets>\r
-                            <destFile>${project.build.directory}/jacoco-dev.exec</destFile>\r
-                        </configuration>\r
-                    </execution>\r
-                               </executions>\r
-                       </plugin>   \r
+                       \r
+<plugin>\r
+          <groupId>org.jacoco</groupId>\r
+          <artifactId>jacoco-maven-plugin</artifactId>\r
+          <version>${jacoco.version}</version>\r
+          <configuration>\r
+            <excludes>\r
+              <exclude>**/gen/**</exclude>\r
+              <exclude>**/generated-sources/**</exclude>\r
+              <exclude>**/yang-gen/**</exclude>\r
+              <exclude>**/pax/**</exclude>\r
+            </excludes>\r
+          </configuration>\r
+          <executions>\r
+\r
+            <execution>\r
+              <id>pre-unit-test</id>\r
+              <goals>\r
+                <goal>prepare-agent</goal>\r
+              </goals>\r
+              <configuration>\r
+                <destFile>${project.build.directory}/code-coverage/jacoco-ut.exec</destFile>\r
+                <propertyName>surefireArgLine</propertyName>\r
+              </configuration>\r
+            </execution>\r
+            \r
+       \r
+            <execution>\r
+              <id>post-unit-test</id>\r
+              <phase>test</phase>\r
+              <goals>\r
+                <goal>report</goal>\r
+              </goals>\r
+              <configuration>\r
+                <dataFile>${project.build.directory}/code-coverage/jacoco-ut.exec</dataFile>\r
+                <outputDirectory>${project.reporting.outputDirectory}/jacoco-ut</outputDirectory>\r
+              </configuration>\r
+            </execution>\r
+            <execution>\r
+              <id>pre-integration-test</id>\r
+              <phase>pre-integration-test</phase>\r
+              <goals>\r
+                <goal>prepare-agent</goal>\r
+              </goals>\r
+              <configuration>\r
+                <destFile>${project.build.directory}/code-coverage/jacoco-it.exec</destFile>\r
+\r
+                <propertyName>failsafeArgLine</propertyName>\r
+              </configuration>\r
+            </execution>\r
+\r
+       \r
+            <execution>\r
+              <id>post-integration-test</id>\r
+              <phase>post-integration-test</phase>\r
+              <goals>\r
+                <goal>report</goal>\r
+              </goals>\r
+              <configuration>\r
+                <dataFile>${project.build.directory}/code-coverage/jacoco-it.exec</dataFile>\r
+                <outputDirectory>${project.reporting.outputDirectory}/jacoco-it</outputDirectory>\r
+              </configuration>\r
+            </execution>\r
+          </executions>\r
+        </plugin>      \r
 \r
+                       \r
                </plugins>\r
        </build>\r
                <distributionManagement>\r
index 765a110..9896109 100644 (file)
 <properties>\r
                <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>\r
                <project.cadiVersion>1.0.0-SNAPSHOT</project.cadiVersion>\r
-               <sonar.language>java</sonar.language>\r
-               <sonar.java.coveragePlugin>jacoco</sonar.java.coveragePlugin>\r
-               <sonar.surefire.reportsPath>${project.build.directory}/surefire-reports</sonar.surefire.reportsPath>\r
-               <sonar.jacoco.reportPath>${project.build.directory}/coverage-reports/jacoco.exec</sonar.jacoco.reportPath>\r
-               <sonar.jacoco.itReportPath>${project.build.directory}/coverage-reports/jacoco-it.exec</sonar.jacoco.itReportPath>\r
-               <sonar.jacoco.reportMissing.force.zero>true</sonar.jacoco.reportMissing.force.zero>\r
-               <sonar.projectVersion>${project.version}</sonar.projectVersion>\r
+               <!--  SONAR  -->\r
+                <jacoco.version>0.7.7.201606060606</jacoco.version>\r
+           <sonar-jacoco-listeners.version>3.2</sonar-jacoco-listeners.version>\r
+           <sonar.core.codeCoveragePlugin>jacoco</sonar.core.codeCoveragePlugin>\r
+           <!-- Default Sonar configuration -->\r
+           <sonar.jacoco.reportPath>target/code-coverage/jacoco-ut.exec</sonar.jacoco.reportPath>\r
+           <sonar.jacoco.itReportPath>target/code-coverage/jacoco-it.exec</sonar.jacoco.itReportPath>\r
+           <!-- Note: This list should match jacoco-maven-plugin's exclusion list below -->\r
+           <sonar.exclusions>**/gen/**,**/generated-sources/**,**/yang-gen**,**/pax/**</sonar.exclusions>\r
         <nexusproxy>https://nexus.onap.org</nexusproxy>\r
                <snapshotNexusPath>/content/repositories/snapshots/</snapshotNexusPath>\r
                <releaseNexusPath>/content/repositories/releases/</releaseNexusPath>\r
                        </plugin>\r
 \r
 <plugin>\r
-                               <groupId>org.jacoco</groupId>\r
-                               <artifactId>jacoco-maven-plugin</artifactId>\r
-                               <version>0.7.7.201606060606</version>\r
-                               <configuration>\r
-                                       <dumpOnExit>true</dumpOnExit>\r
-                                       <includes>\r
-                                               <include>org.onap.aaf.*</include>\r
-                                       </includes>\r
-                               </configuration>\r
-                               <executions>\r
-                                       <execution>\r
-                                               <id>pre-unit-test</id>\r
-                                               <goals>\r
-                                                       <goal>prepare-agent</goal>\r
-                                               </goals>\r
-                                               <configuration>\r
-                                                       <destFile>${project.build.directory}/coverage-reports/jacoco.exec</destFile>\r
-                                                       <!-- <append>true</append> -->\r
-                                               </configuration>\r
-                                       </execution>\r
-                                       <execution>\r
-                                               <id>pre-integration-test</id>\r
-                                               <phase>pre-integration-test</phase>\r
-                                               <goals>\r
-                                                       <goal>prepare-agent</goal>\r
-                                               </goals>\r
-                                               <configuration>\r
-                                                       <destFile>${project.build.directory}/coverage-reports/jacoco-it.exec</destFile>\r
-                                                       <!-- <append>true</append> -->\r
-                                               </configuration>\r
-                                       </execution>\r
-                                       <execution>\r
-                        <goals>\r
-                            <goal>merge</goal>\r
-                        </goals>\r
-                        <phase>post-integration-test</phase>\r
-                        <configuration>\r
-                            <fileSets>\r
-                                <fileSet implementation="org.apache.maven.shared.model.fileset.FileSet">\r
-                                    <directory>${project.build.directory}/coverage-reports</directory>\r
-                                    <includes>\r
-                                        <include>*.exec</include>\r
-                                    </includes>\r
-                                </fileSet>\r
-                            </fileSets>\r
-                            <destFile>${project.build.directory}/jacoco-dev.exec</destFile>\r
-                        </configuration>\r
-                    </execution>\r
-                               </executions>\r
-                       </plugin>          \r
+          <groupId>org.jacoco</groupId>\r
+          <artifactId>jacoco-maven-plugin</artifactId>\r
+          <version>${jacoco.version}</version>\r
+          <configuration>\r
+            <excludes>\r
+              <exclude>**/gen/**</exclude>\r
+              <exclude>**/generated-sources/**</exclude>\r
+              <exclude>**/yang-gen/**</exclude>\r
+              <exclude>**/pax/**</exclude>\r
+            </excludes>\r
+          </configuration>\r
+          <executions>\r
+\r
+            <execution>\r
+              <id>pre-unit-test</id>\r
+              <goals>\r
+                <goal>prepare-agent</goal>\r
+              </goals>\r
+              <configuration>\r
+                <destFile>${project.build.directory}/code-coverage/jacoco-ut.exec</destFile>\r
+                <propertyName>surefireArgLine</propertyName>\r
+              </configuration>\r
+            </execution>\r
+            \r
+       \r
+            <execution>\r
+              <id>post-unit-test</id>\r
+              <phase>test</phase>\r
+              <goals>\r
+                <goal>report</goal>\r
+              </goals>\r
+              <configuration>\r
+                <dataFile>${project.build.directory}/code-coverage/jacoco-ut.exec</dataFile>\r
+                <outputDirectory>${project.reporting.outputDirectory}/jacoco-ut</outputDirectory>\r
+              </configuration>\r
+            </execution>\r
+            <execution>\r
+              <id>pre-integration-test</id>\r
+              <phase>pre-integration-test</phase>\r
+              <goals>\r
+                <goal>prepare-agent</goal>\r
+              </goals>\r
+              <configuration>\r
+                <destFile>${project.build.directory}/code-coverage/jacoco-it.exec</destFile>\r
+\r
+                <propertyName>failsafeArgLine</propertyName>\r
+              </configuration>\r
+            </execution>\r
+\r
+       \r
+            <execution>\r
+              <id>post-integration-test</id>\r
+              <phase>post-integration-test</phase>\r
+              <goals>\r
+                <goal>report</goal>\r
+              </goals>\r
+              <configuration>\r
+                <dataFile>${project.build.directory}/code-coverage/jacoco-it.exec</dataFile>\r
+                <outputDirectory>${project.reporting.outputDirectory}/jacoco-it</outputDirectory>\r
+              </configuration>\r
+            </execution>\r
+          </executions>\r
+        </plugin>      \r
+\r
 \r
                </plugins>\r
        </build>\r
index 6979663..2ff01fb 100644 (file)
        <properties>\r
                <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>\r
                <project.cadiVersion>1.0.0-SNAPSHOT</project.cadiVersion>\r
-               <sonar.language>java</sonar.language>\r
-               <sonar.java.coveragePlugin>jacoco</sonar.java.coveragePlugin>\r
-               <sonar.surefire.reportsPath>${project.build.directory}/surefire-reports</sonar.surefire.reportsPath>\r
-               <sonar.jacoco.reportPath>${project.build.directory}/coverage-reports/jacoco.exec</sonar.jacoco.reportPath>\r
-               <sonar.jacoco.itReportPath>${project.build.directory}/coverage-reports/jacoco-it.exec</sonar.jacoco.itReportPath>\r
-               <sonar.jacoco.reportMissing.force.zero>true</sonar.jacoco.reportMissing.force.zero>\r
-               <sonar.projectVersion>${project.version}</sonar.projectVersion>\r
+               <!--  SONAR  -->\r
+                <jacoco.version>0.7.7.201606060606</jacoco.version>\r
+           <sonar-jacoco-listeners.version>3.2</sonar-jacoco-listeners.version>\r
+           <sonar.core.codeCoveragePlugin>jacoco</sonar.core.codeCoveragePlugin>\r
+           <!-- Default Sonar configuration -->\r
+           <sonar.jacoco.reportPath>target/code-coverage/jacoco-ut.exec</sonar.jacoco.reportPath>\r
+           <sonar.jacoco.itReportPath>target/code-coverage/jacoco-it.exec</sonar.jacoco.itReportPath>\r
+           <!-- Note: This list should match jacoco-maven-plugin's exclusion list below -->\r
+           <sonar.exclusions>**/gen/**,**/generated-sources/**,**/yang-gen**,**/pax/**</sonar.exclusions>\r
         <nexusproxy>https://nexus.onap.org</nexusproxy>\r
                <snapshotNexusPath>/content/repositories/snapshots/</snapshotNexusPath>\r
                <releaseNexusPath>/content/repositories/releases/</releaseNexusPath>\r
                                        <serverId>ecomp-staging</serverId>\r
                                </configuration>\r
                        </plugin> \r
-                       <plugin>\r
-                               <groupId>org.jacoco</groupId>\r
-                               <artifactId>jacoco-maven-plugin</artifactId>\r
-                               <version>0.7.7.201606060606</version>\r
-                               <configuration>\r
-                                       <dumpOnExit>true</dumpOnExit>\r
-                                       <includes>\r
-                                               <include>org.onap.aaf.*</include>\r
-                                       </includes>\r
-                               </configuration>\r
-                               <executions>\r
-                                       <execution>\r
-                                               <id>pre-unit-test</id>\r
-                                               <goals>\r
-                                                       <goal>prepare-agent</goal>\r
-                                               </goals>\r
-                                               <configuration>\r
-                                                       <destFile>${project.build.directory}/coverage-reports/jacoco.exec</destFile>\r
-                                                       <!-- <append>true</append> -->\r
-                                               </configuration>\r
-                                       </execution>\r
-                                       <execution>\r
-                                               <id>pre-integration-test</id>\r
-                                               <phase>pre-integration-test</phase>\r
-                                               <goals>\r
-                                                       <goal>prepare-agent</goal>\r
-                                               </goals>\r
-                                               <configuration>\r
-                                                       <destFile>${project.build.directory}/coverage-reports/jacoco-it.exec</destFile>\r
-                                                       <!-- <append>true</append> -->\r
-                                               </configuration>\r
-                                       </execution>\r
-                                       <execution>\r
-                        <goals>\r
-                            <goal>merge</goal>\r
-                        </goals>\r
-                        <phase>post-integration-test</phase>\r
-                        <configuration>\r
-                            <fileSets>\r
-                                <fileSet implementation="org.apache.maven.shared.model.fileset.FileSet">\r
-                                    <directory>${project.build.directory}/coverage-reports</directory>\r
-                                    <includes>\r
-                                        <include>*.exec</include>\r
-                                    </includes>\r
-                                </fileSet>\r
-                            </fileSets>\r
-                            <destFile>${project.build.directory}/jacoco-dev.exec</destFile>\r
-                        </configuration>\r
-                    </execution>\r
-                               </executions>\r
-                       </plugin>\r
+                       \r
+<plugin>\r
+          <groupId>org.jacoco</groupId>\r
+          <artifactId>jacoco-maven-plugin</artifactId>\r
+          <version>${jacoco.version}</version>\r
+          <configuration>\r
+            <excludes>\r
+              <exclude>**/gen/**</exclude>\r
+              <exclude>**/generated-sources/**</exclude>\r
+              <exclude>**/yang-gen/**</exclude>\r
+              <exclude>**/pax/**</exclude>\r
+            </excludes>\r
+          </configuration>\r
+          <executions>\r
+\r
+            <execution>\r
+              <id>pre-unit-test</id>\r
+              <goals>\r
+                <goal>prepare-agent</goal>\r
+              </goals>\r
+              <configuration>\r
+                <destFile>${project.build.directory}/code-coverage/jacoco-ut.exec</destFile>\r
+                <propertyName>surefireArgLine</propertyName>\r
+              </configuration>\r
+            </execution>\r
+            \r
+       \r
+            <execution>\r
+              <id>post-unit-test</id>\r
+              <phase>test</phase>\r
+              <goals>\r
+                <goal>report</goal>\r
+              </goals>\r
+              <configuration>\r
+                <dataFile>${project.build.directory}/code-coverage/jacoco-ut.exec</dataFile>\r
+                <outputDirectory>${project.reporting.outputDirectory}/jacoco-ut</outputDirectory>\r
+              </configuration>\r
+            </execution>\r
+            <execution>\r
+              <id>pre-integration-test</id>\r
+              <phase>pre-integration-test</phase>\r
+              <goals>\r
+                <goal>prepare-agent</goal>\r
+              </goals>\r
+              <configuration>\r
+                <destFile>${project.build.directory}/code-coverage/jacoco-it.exec</destFile>\r
+\r
+                <propertyName>failsafeArgLine</propertyName>\r
+              </configuration>\r
+            </execution>\r
+\r
+       \r
+            <execution>\r
+              <id>post-integration-test</id>\r
+              <phase>post-integration-test</phase>\r
+              <goals>\r
+                <goal>report</goal>\r
+              </goals>\r
+              <configuration>\r
+                <dataFile>${project.build.directory}/code-coverage/jacoco-it.exec</dataFile>\r
+                <outputDirectory>${project.reporting.outputDirectory}/jacoco-it</outputDirectory>\r
+              </configuration>\r
+            </execution>\r
+          </executions>\r
+        </plugin>      \r
 \r
+                       \r
                </plugins>\r
        </build>\r
        <distributionManagement>\r
diff --git a/pom.xml b/pom.xml
index bd51850..81316c1 100644 (file)
--- a/pom.xml
+++ b/pom.xml
                <!-- jetty-version>7.2.0.v20101020</jetty-version -->
                <!-- project.jettyVersion>9.0.3.v20130506</project.jettyVersion -->
                <project.cadiVersion>1.0.0-SNAPSHOT</project.cadiVersion>
-               <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}/coverage-reports/jacoco.exec</sonar.jacoco.reportPath>
-               <sonar.jacoco.itReportPath>${project.build.directory}/coverage-reports/jacoco-it.exec</sonar.jacoco.itReportPath>
-               <sonar.jacoco.reportMissing.force.zero>true</sonar.jacoco.reportMissing.force.zero>
-               <sonar.projectVersion>${project.version}</sonar.projectVersion>
+               
+               <!--  SONAR  -->
+                <jacoco.version>0.7.7.201606060606</jacoco.version>
+           <sonar-jacoco-listeners.version>3.2</sonar-jacoco-listeners.version>
+           <sonar.core.codeCoveragePlugin>jacoco</sonar.core.codeCoveragePlugin>
+           <!-- Default Sonar configuration -->
+           <sonar.jacoco.reportPath>target/code-coverage/jacoco-ut.exec</sonar.jacoco.reportPath>
+           <sonar.jacoco.itReportPath>target/code-coverage/jacoco-it.exec</sonar.jacoco.itReportPath>
+           <!-- Note: This list should match jacoco-maven-plugin's exclusion list below -->
+           <sonar.exclusions>**/gen/**,**/generated-sources/**,**/yang-gen**,**/pax/**</sonar.exclusions>
                <nexusproxy>https://nexus.onap.org</nexusproxy>
                <snapshotNexusPath>/content/repositories/snapshots/</snapshotNexusPath>
                <releaseNexusPath>/content/repositories/releases/</releaseNexusPath>
                        </plugin> 
                        
                        <plugin>
-                               <groupId>org.jacoco</groupId>
-                               <artifactId>jacoco-maven-plugin</artifactId>
-                               <version>0.7.7.201606060606</version>
-                               <configuration>
-                                       <dumpOnExit>true</dumpOnExit>
-                                       <includes>
-                                               <include>org.onap.aaf.*</include>
-                                       </includes>
-                               </configuration>
-                               <executions>
-                                       <execution>
-                                               <id>pre-unit-test</id>
-                                               <goals>
-                                                       <goal>prepare-agent</goal>
-                                               </goals>
-                                               <configuration>
-                                                       <destFile>${project.build.directory}/coverage-reports/jacoco.exec</destFile>
-                                                       <!-- <append>true</append> -->
-                                               </configuration>
-                                       </execution>
-                                       <execution>
-                                               <id>pre-integration-test</id>
-                                               <phase>pre-integration-test</phase>
-                                               <goals>
-                                                       <goal>prepare-agent</goal>
-                                               </goals>
-                                               <configuration>
-                                                       <destFile>${project.build.directory}/coverage-reports/jacoco-it.exec</destFile>
-                                                       <!-- <append>true</append> -->
-                                               </configuration>
-                                       </execution>
-                                       <execution>
-                        <goals>
-                            <goal>merge</goal>
-                        </goals>
-                        <phase>post-integration-test</phase>
-                        <configuration>
-                            <fileSets>
-                                <fileSet implementation="org.apache.maven.shared.model.fileset.FileSet">
-                                    <directory>${project.build.directory}/coverage-reports</directory>
-                                    <includes>
-                                        <include>*.exec</include>
-                                    </includes>
-                                </fileSet>
-                            </fileSets>
-                            <destFile>${project.build.directory}/jacoco-dev.exec</destFile>
-                        </configuration>
-                    </execution>
-                               </executions>
-                       </plugin>
+          <groupId>org.jacoco</groupId>
+          <artifactId>jacoco-maven-plugin</artifactId>
+          <version>${jacoco.version}</version>
+          <configuration>
+            <excludes>
+              <exclude>**/gen/**</exclude>
+              <exclude>**/generated-sources/**</exclude>
+              <exclude>**/yang-gen/**</exclude>
+              <exclude>**/pax/**</exclude>
+            </excludes>
+          </configuration>
+          <executions>
+
+            <execution>
+              <id>pre-unit-test</id>
+              <goals>
+                <goal>prepare-agent</goal>
+              </goals>
+              <configuration>
+                <destFile>${project.build.directory}/code-coverage/jacoco-ut.exec</destFile>
+                <propertyName>surefireArgLine</propertyName>
+              </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.reporting.outputDirectory}/jacoco-ut</outputDirectory>
+              </configuration>
+            </execution>
+            <execution>
+              <id>pre-integration-test</id>
+              <phase>pre-integration-test</phase>
+              <goals>
+                <goal>prepare-agent</goal>
+              </goals>
+              <configuration>
+                <destFile>${project.build.directory}/code-coverage/jacoco-it.exec</destFile>
+
+                <propertyName>failsafeArgLine</propertyName>
+              </configuration>
+            </execution>
+
+       
+            <execution>
+              <id>post-integration-test</id>
+              <phase>post-integration-test</phase>
+              <goals>
+                <goal>report</goal>
+              </goals>
+              <configuration>
+                <dataFile>${project.build.directory}/code-coverage/jacoco-it.exec</dataFile>
+                <outputDirectory>${project.reporting.outputDirectory}/jacoco-it</outputDirectory>
+              </configuration>
+            </execution>
+          </executions>
+        </plugin>      
 
                        </plugins>                      
        </build>