Enable Jacoco plugin for code coverage 95/19995/1
authorVishal Thapar <vishal.thapar@ericsson.com>
Mon, 11 May 2015 06:35:18 +0000 (12:05 +0530)
committerVishal Thapar <vishal.thapar@ericsson.com>
Mon, 11 May 2015 06:35:18 +0000 (12:05 +0530)
1. Enable code coverage for *-impl modules.
2. Updated excludes for checkstyle.

Change-Id: I9463788e53c7d52313f4ffcb8305c57711c0d50e
Signed-off-by: Vishal Thapar <vishal.thapar@ericsson.com>
commons/config-parent/pom.xml

index 123382a0452d7b73000bdd5ea0613f93118713f7..cb0475812168042c7b776decfe6c2917944ee9bf 100644 (file)
@@ -24,6 +24,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
   <properties>
     <!-- ODL -->
     <vpnservices.version>0.1.0-SNAPSHOT</vpnservices.version>
+    <jacoco.version>0.7.2.201409121644</jacoco.version>
     <ietf.inet.types.version>2010.09.24.7-SNAPSHOT</ietf.inet.types.version>
     <ietf.yang.types.version>2010.09.24.7-SNAPSHOT</ietf.yang.types.version>
     <ietf.interfaces.version>2014.05.08.7-SNAPSHOT</ietf.interfaces.version>
@@ -55,15 +56,47 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-checkstyle-plugin</artifactId>
+          <executions>
+            <execution>
+              <phase>process-sources</phase>
+              <goals>
+                <goal>check</goal>
+              </goals>
+            </execution>
+          </executions>
         <configuration>
           <configLocation>
             ${project.basedir}/../../commons/src/main/resources/vpns_checks.xml
           </configLocation>
           <failsOnError>true</failsOnError>
           <includes>**/*.java,**/*.xml,**/*.ini,**/*.sh,**/*.bat</includes>
-          <excludes>**/yang/</excludes>
+          <excludes>**\/target\/,**\/bin\/,**\/third-party,**\/yang-gen-sal</excludes>
         </configuration>
       </plugin>
+     <plugin>
+       <groupId>org.jacoco</groupId>
+       <artifactId>jacoco-maven-plugin</artifactId>
+       <configuration>
+         <includes>
+           <include>org.opendaylight.vpnservice.*</include>
+         </includes>
+       </configuration>
+       <executions>
+         <execution>
+           <id>pre-test</id>
+           <goals>
+             <goal>prepare-agent</goal>
+           </goals>
+         </execution>
+         <execution>
+           <id>post-test</id>
+           <goals>
+             <goal>report</goal>
+           </goals>
+           <phase>test</phase>
+         </execution>
+       </executions>
+     </plugin>
     </plugins>
   </build>