HI Marc,

I do use the jenkins plugin which has jacoco version which provides this
functionality.

Regards-
Ankit

On Thu, 6 Jan 2022 at 12:51, Marc Hoffmann <hoffm...@mountainminds.com>
wrote:

> Hi,
>
> please note that the filtering is applied during report generation. AFAIK
> the Jenkins plugin has its own dependencies to specific JaCoCo versions.
> Please check which version is used there.
>
> Regards,
> -marc
>
>
>
> On 4. Jan 2022, at 01:08, Ankit Jain <dropmailt...@gmail.com> wrote:
>
> HI Team,
>
> We want to exclude the jacoco coverage for certain methods from some of
> the classes. For that we using the custom annotation based feature
> introduced in jacoco plugin from 0.8.2 version onwards.
>
> For us we are using this plugin both in eclipse and through jenkins but
> unfortunately it is not excluding the annotated methods from coverage. We
> are getting jacoco coverage including these methods too.
>
> Eclipse Version: 2021-09 (4.21.0), Build id: 20210910-1417
> Jenkins jacoco plugin version: 3.3.1.
> Maven version: 3.6.1
> Running the below cmd from eclipse to generate jacoco code coverage:
> *clean org.jacoco:jacoco-maven-plugin:prepare-agent install jacoco:report*
> From jenkins:
> *clean -B -U -T 2 org.jacoco:jacoco-maven-plugin:prepare-agent pmd:pmd
> pmd:cpd findbugs:findbugs -Dmaven.test.failure.ignore=true package*
>
> One thing to mention here is that in my pom i dont added
> jacoco-maven-plugin explicitly and just running that jacoco plugin directly
> from arguments like above.
>
> Custom annotation created like below:
>
> @Retention(RUNTIME)
> @Target(METHOD)
> public @interface Generated {}
>
> I tried with other name like ExcludeMethodFromJacocoGeneratedReport but no
> luck.
>
> Usage of annotation example in my code:
> @Generated
> public void method() {}
>
> Another example:
> @ExcludeMethodFromJacocoGeneratedReport
> public void method() {}
>
> Let me know what is missing here.
>
> Regards-
> Ankit
>
> --
> 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+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jacoco/b5fcd816-1547-44ea-92e5-5d2a58f8a898n%40googlegroups.com
> <https://groups.google.com/d/msgid/jacoco/b5fcd816-1547-44ea-92e5-5d2a58f8a898n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
>
> --
> 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+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jacoco/8AE472ED-AC4E-49A9-83FD-E425C3D4CCD0%40mountainminds.com
> <https://groups.google.com/d/msgid/jacoco/8AE472ED-AC4E-49A9-83FD-E425C3D4CCD0%40mountainminds.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jacoco/CAPLFLCMRRh4nJHkw-rhgBVHza02fhfp5Wbq2ck0GsjQ4vonhPg%40mail.gmail.com.

Reply via email to