Configure jacoco plugin 85/69285/2
authorayalaben <ayala.benzvi@amdocs.com>
Thu, 27 Sep 2018 11:27:45 +0000 (14:27 +0300)
committerayalaben <ayala.benzvi@amdocs.com>
Thu, 27 Sep 2018 12:28:05 +0000 (15:28 +0300)
Change-Id: I15b3a1f96855115c84a72bec4029e668c7c58501
Issue-ID: SDC-1801
Signed-off-by: ayalaben <ayala.benzvi@amdocs.com>
pom.xml

diff --git a/pom.xml b/pom.xml
index 498f226..e4131bb 100644 (file)
--- a/pom.xml
+++ b/pom.xml
@@ -33,6 +33,7 @@
     <packaging>pom</packaging>
 
     <properties>
+        <jacoco.skip>true</jacoco.skip>
         <maven.compiler.source>1.8</maven.compiler.source>
         <maven.compiler.target>1.8</maven.compiler.target>
         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
     <build>
         <pluginManagement>
             <plugins>
+                <plugin>
+                    <groupId>org.apache.maven.plugins</groupId>
+                    <artifactId>maven-surefire-plugin</artifactId>
+                    <version>2.22.0</version>
+                </plugin>
+                <plugin>
+                    <groupId>org.jacoco</groupId>
+                    <artifactId>jacoco-maven-plugin</artifactId>
+                    <version>0.8.2</version>
+                </plugin>
                 <plugin>
                     <groupId>io.fabric8</groupId>
                     <artifactId>docker-maven-plugin</artifactId>
             </plugins>
         </pluginManagement>
         <plugins>
+            <plugin>
+                <groupId>org.jacoco</groupId>
+                <artifactId>jacoco-maven-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>default-prepare-agent</id>
+                        <goals>
+                            <goal>prepare-agent</goal>
+                        </goals>
+                    </execution>
+                    <execution>
+                        <id>report</id>
+                        <phase>prepare-package</phase>
+                        <goals>
+                            <goal>report</goal>
+                        </goals>
+                    </execution>
+                    <execution>
+                        <id>post-unit-test</id>
+                        <phase>test</phase>
+                        <goals>
+                            <goal>report</goal>
+                        </goals>
+                        <configuration>
+                            <dataFile>target/jacoco.exec</dataFile>
+                            <outputDirectory>target/jacoco-ut</outputDirectory>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+
             <plugin>
                 <groupId>org.sonatype.plugins</groupId>
                 <artifactId>nexus-staging-maven-plugin</artifactId>