Hi,
the name is the the JVM class name, e.g. org/example/AppIdentifier (no
.class suffix).
So actually excludes="*AppIdentifier*" should do the job.
Regards,
-marc
On 2016-08-15 07:49, Asanke Galgomuwa wrote:
> The doc in
http://www.eclemma.org/jacoco/trunk/doc/ant.html says
>
> excludes
> A list of class names that should be excluded from execution
> analysis. The list entries are separated by a colon (:) and may use
> wildcard characters (* and ?). Except for performance optimization or
> technical corner cases this option is normally not required.
> _empty_ (no excluded classes)
>
> I have a ant build which executes the jacoco with junit task
>
> I have configured my ant buld as follows;
>
> <TASKDEF URI="ANTLIB:ORG.JACOCO.ANT"
> RESOURCE="ORG/JACOCO/ANT/ANTLIB.XML" CLASSPATHREF="JACOCO.CLASSPATH"
> />
>
> <JACOCO:COVERAGE DESTFILE="${JACOCO.DIR}/JACOCO.EXEC" APPEND="FALSE"
> XMLNS:JACOCO="ANTLIB:ORG.JACOCO.ANT" EXCLUDES="**/*APPIDENTIFIER*.*">
> <JUNIT FORK="YES" FORKMODE="ONCE" PRINTSUMMARY="TRUE"
> FAILUREPROPERTY="JUNIT.FAILURE" HALTONFAILURE="NO" SHOWOUTPUT="TRUE">
> .
> .
> .
> </junit>
>
> </JACOCO:COVERAGE>
>
> I need to exclude one application class (Why is a long story), (say
> AppIdentifier.class) from the code coverage so that this do not gets
> instrumented with jacoco. I bliev that means the class should not be
> in jacoco.exec when the test finishes.
>
> I have used the following patterns to try to figure out the way the
> exclusion works.
>
> EXCLUDES="*" - that EXCLUDE all classes
> EXCLUDES="*.CLASS" - that include all classes
> EXCLUDES="**/*.CLASS" - that include all classes
> EXCLUDES="**/*.*" - that EXCLUDE all classes
>
> So hoping the result will be a success I used ...
> EXCLUDES=**/*APPIDENTIFIER*.* - INCLUDES ALL
>
> So non of this works for me.
> How can I exclude the the give AppIdentifier.class from my coverage.
>
> I use Jnuit 4.12
> java 1.6
> jacoco 0.7.6.201602180812
>
> --
> 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.
> To view this discussion on the web visit
>
https://groups.google.com/d/msgid/jacoco/a9649514-a7c2-483e-93c9-ca0a5582e9a5%40googlegroups.com
> [1].
> For more options, visit
https://groups.google.com/d/optout.
>
>
> Links:
> ------
> [1]
>
https://groups.google.com/d/msgid/jacoco/a9649514-a7c2-483e-93c9-ca0a5582e9a5%40googlegroups.com?utm_medium=email&utm_source=footer