This week's book giveaway is in the JavaScript forum.
We're giving away four copies of JavaScript Promises Essentials and have Rami Sarieddine on-line!
See this thread for details.
The moose likes Ant, Maven and Other Build Tools and the fly likes emma-maven-plugin - filter excludes Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of JavaScript Promises Essentials this week in the JavaScript forum!
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "emma-maven-plugin - filter excludes" Watch "emma-maven-plugin - filter excludes" New topic
Author

emma-maven-plugin - filter excludes

Vijay Penmetsa
Greenhorn

Joined: Jun 22, 2011
Posts: 2
Hi All

I would like to have your helping hand in resolving a problem in maven emma code coverage reporting,All that I want is to eliminate some classes from final emma report generated,I have tried using plugin (emma-maven-plugin) in my POM file but it doesn't work out for me - the filtered classes are still apearing in emma report

I have pasted POM file which i used in my project

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.vj.ci</groupId>
<artifactId>svn</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>svn</name>
<description>Test project for SVN Integration</description>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>

<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.5</source>
<target>1.5</target>
</configuration>

</plugin>


<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>emma-maven-plugin</artifactId>
<version>1.0-alpha-3</version>
<inherited>true</inherited>
<executions>
<execution>
<phase>process-classes</phase>
<configuration>
<filters>
<filter>
<excludes>**/sample/Track.java</excludes>
<excludes>**/sample/TestTrack.java</excludes>
</filter>
<filter>
<includes>**/sample/FirstSvn.java</includes>
</filter>
<filter>-svn.sample.*</filter>
<filter>-svn.sample.Track.*</filter>
</filters>
</configuration>
<goals>
<goal>instrument</goal>
</goals>
</execution>
</executions>
</plugin>



<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<inherited>true</inherited>
<configuration>
<forkMode>once</forkMode>
<reportFormat>xml</reportFormat>
<excludes>
<exclude>**/sample/TestTrack.java</exclude>
</excludes>
<classesDirectory>${project.build.directory}/generated-classes/emma/classes</classesDirectory>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>


<reporting>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>emma-maven-plugin</artifactId>
<version>1.0-alpha-3</version>
<inherited>true</inherited>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>surefire-report-maven-plugin</artifactId>
<version>2.0-beta-1</version>
<inherited>true</inherited>
</plugin>
</plugins>
</reporting>



<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
</dependencies>
</project>



Please help.

Thank you

Best Regards
Vijay Penmetsa

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: emma-maven-plugin - filter excludes