Hi, please see FAQ (https://www.jacoco.org/jacoco/trunk/doc/faq.html):
Regards, -marc Why do I see classes in the coverage report although I excluded them in the JaCoCo agent configuration? The includes and excludes options of the JaCoCo agent determine for which classes execution data is collected. Except for technical corner cases these options are normally not required. If you exclude classes, no execution data is collected for them. Report creation is a separate step where all class files which should show up in the report are explicitly provided. Coverage is determined from the provided execution data. If execution data is missing for a particular class, this class is shown as not covered because the report generator cannot distinguish whether the class was excluded from instrumentation or not executed. If you want to exclude classes from the report please configure the respective report generation tool accordingly. > On 3. Oct 2024, at 09:30, Aryeh Friedman <aryeh.fried...@gmail.com> wrote: > > I am not using ant/maven or any other supported third party build/test > coverage creation combo (i.e. roll my own) and was wondering how to > get excludes=... really working currently it will exclude the but not > from the HTML coverage report: > > #!/bin/tcsh > # > # Copyright (C) 2024 Aryeh M. Friedman > # Copyright (C) 2018-2021 Friedman-Nixon-Wong Enterprises, LLC & contributors > > source getVersions.csh > > set project=`aesub '$p'` > set tmp=/tmp/$$ > set here=`pwd` > set sysLib=/usr/local/share/java/classes; > #sh src/testdata/pt1.sh > > sudo rm -rf $here/jacoco.exec > sudo touch $here/jacoco.exec > sudo chmod 777 $here/jacoco.exec > > mkdir $tmp > chmod 777 $tmp > cd $tmp > > ln -s $here/src src > > sudo -u www java > "-javaagent:$sysLib/jacocoagent.jar=destfile=$here/jacoco.exec,jmx=true,excludes=test/**" > -cp > $here/scrap/www/WEB-INF/lib/$project.jar:$sysLib/thisTest$thisTestVersion.jar:$sysLib/pcCommon$pcCommonVersion.jar:$sysLib/dudes-lang-common$dudeslangcommonVersion.jar > test.TestMain > set stat=$? > > cd $here > sudo rm -rf testCoverage > set cf=""; > foreach i (`ls -d scrap/obj/java/21/*`) > if($i == scrap/obj/java/21/mockdata) then > continue; > endif > > if($i == scrap/obj/java/21/test) then > continue; > endif > > if($i == scrap/obj/java/21/testapps) then > continue; > endif > > set cf=`echo '--classfiles'=$i $cf` > end > > sudo java -jar $sysLib/jacococli.jar report jacoco.exec $cf > --sourcefiles=src/java --html=testCoverage --quiet > sudo chmod -R 777 testCoverage > > sudo rm -rf $tmp > exit $stat > > > -- > Aryeh M. Friedman, Lead Developer, http://www.PetiteCloud.org > > -- > 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/CAGBxaXmu0%2BJfvU%2BQL4VxKzJ5jbsCoWaW5ozSDL0Ku0gRTdO01w%40mail.gmail.com. -- 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/9C683BF3-9670-40CB-9C7C-57D037654883%40mountainminds.com.