Issue Details (XML | Word | Printable)

Key: MPJCOVERAGE-20
Type: Improvement Improvement
Status: Closed Closed
Resolution: Fixed
Priority: Trivial Trivial
Assignee: Emmanuel Venisse
Reporter: Tobias Joch
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Maven 1.x JCoverage Plugin

allow comma separeted values for maven.jcoverage.instrumentation.excludes

Created: 27/Oct/04 04:13 AM   Updated: 23/Jan/05 10:14 AM   Resolved: 23/Jan/05 10:14 AM
Return to search
Component/s: None
Affects Version/s: 1.0, 1.0.1, 1.0.2, 1.0.3, 1.0.4, 1.0.5, 1.0.6, 1.0.7, 1.0.8, 1.0.9
Fix Version/s: 1.1

Time Tracking:
Not Specified

File Attachments: 1. Text File patch.txt (2 kB)



 Description  « Hide

With following modification in the plugin.jelly a user can specify more than one exclude filters via maven.jcoverage.instrumentation.excludes (comma separeted).

Here the patch in the plugin.jelly:

Index: plugin.jelly
===================================================================
RCS file: /home/cvspublic/maven-plugins/jcoverage/plugin.jelly,v
retrieving revision 1.16
diff -u -r1.16 plugin.jelly
— plugin.jelly 17 Aug 2004 14:00:48 -0000 1.16
+++ plugin.jelly 27 Oct 2004 08:09:25 -0000
@@ -121,10 +121,16 @@
<maven:addPath id="maven.dependency.classpath" refid="jcoverage.classpath"/>
<maven:addPath id="maven.dependency.classpath" refid="${pom.getDependencyClasspath()}"/>

+
+ <u:tokenize var="maven.jcoverage.instrumentation.excludes.split" delim=",">${maven.jcoverage.instrumentation.excludes}</u:tokenize>
+
<instrument todir="${maven.jcoverage.instrumentation}">
- <ant:fileset dir="${maven.build.dest}"
- includes="${maven.jcoverage.instrumentation.includes}"
- excludes="${maven.jcoverage.instrumentation.excludes}"/>
+ <ant:fileset dir="${maven.build.dest}">
+ <ant:include name="*/.class" />
+ <j:forEach var="var" items="${maven.jcoverage.instrumentation.excludes.split}">
+ <ant:exclude name="${var}" />
+ </j:forEach>
+ </ant:fileset>
<ant:classpath>
<ant:path refid="jcoverage.classpath"/>
</ant:classpath>
@@ -133,9 +139,12 @@
<ant:copy todir="${maven.jcoverage.instrumentation}">
<ant:fileset dir="${maven.build.dest}">
<ant:exclude name="*/.class" />

  • <ant:exclude name="${maven.jcoverage.instrumentation.excludes}" />
  • </ant:fileset>
    + <j:forEach var="var" items="${maven.jcoverage.instrumentation.excludes.split}">
    + <ant:exclude name="${var}" />
    + </j:forEach>
    + </ant:fileset>
    </ant:copy>
    +

</j:catch>
<j:if test="${ex != null}">



Tobias Joch added a comment - 27/Oct/04 04:15 AM

here is the patch as file...


Tobias Joch made changes - 27/Oct/04 04:15 AM
Field Original Value New Value
Attachment patch.txt [ 13264 ]
Emmanuel Venisse added a comment - 23/Jan/05 10:14 AM

Applied.


Emmanuel Venisse made changes - 23/Jan/05 10:14 AM
Resolution Fixed [ 1 ]
Fix Version/s 1.0.10 [ 11470 ]
Status Open [ 1 ] Closed [ 6 ]