Ant Report: Include/Exclude class files from jar files

275 views
Skip to first unread message

donny choo

unread,
Mar 17, 2014, 10:52:20 PM3/17/14
to jac...@googlegroups.com
HI,

I've got jar files from our project.  I need to use these as the class files for the coverage report.

I want to be able to do this:

                <classfiles>
                    <fileset dir="${my.jars}">
                        <include name="**/com/my/jars/**/*.class" />
                    </fileset>
                </classfiles>

but that does not include any files.  If I leave the include off, I get all the files.

Is there a way to include specific class files inside jars like this?

Thanks!

Marc R. Hoffmann

unread,
Mar 20, 2014, 1:57:38 PM3/20/14
to jac...@googlegroups.com
Hi,

this will not work as the filter applies to the JAR files itself and will obiously filter them out.

But there are several options to solve this:

1) Unpack the JARs first
2) Use ANT's zipfileset to provide a filtered list of class files
3) Future versions of JaCoCo might come with a class name filter (https://github.com/jacoco/jacoco/issues/17)

Best regards,
-marc
--
You received this message because you are subscribed to the Google Groups "JaCoCo and EclEmma Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jacoco+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


donny choo

unread,
Mar 21, 2014, 12:49:15 PM3/21/14
to jac...@googlegroups.com
I will try zipfilesets!  thx.
Reply all
Reply to author
Forward
This conversation is locked
You cannot reply and perform actions on locked conversations.
0 new messages