Fix SONAR Jacoco plugin - add report 71/14971/1
authorOfir Sonsino <os0695@att.com>
Mon, 25 Sep 2017 08:32:11 +0000 (11:32 +0300)
committerOfir Sonsino <os0695@att.com>
Mon, 25 Sep 2017 08:32:33 +0000 (11:32 +0300)
Issue-ID: VID-60
Change-Id: I6fd155d35de30f25b727169fdc1c29f04248e2b4
Signed-off-by: Ofir Sonsino <os0695@att.com>
epsdk-app-onap/pom.xml

index 0fb1e2b..1dc9341 100755 (executable)
                                                        <destFile>${project.build.directory}/coverage-reports/jacoco.exec</destFile>\r
                                                </configuration>\r
                                        </execution>\r
+                               <!-- Ensures that the code coverage report for unit tests is created after unit tests have been run. -->\r
+                    <execution>\r
+                        <id>post-unit-test</id>\r
+                        <phase>test</phase>\r
+                        <goals>\r
+                            <goal>report</goal>\r
+                        </goals>\r
+                        <configuration>\r
+                            <!-- Sets the path to the file which contains the execution data. -->\r
+                            <dataFile>${sonar.jacoco.reportPath}</dataFile>\r
+                            <!-- Sets the output directory for the code coverage report. -->\r
+                            <outputDirectory>${project.build.directory}/jacoco_report</outputDirectory>\r
+                        </configuration>\r
+                    </execution>\r
                                </executions>\r
                        </plugin>\r
                </plugins>\r