Hello, Can you confirm this? Jacoco java agent accepts '.' naming convention -javaagent:*[yourpath/]*jacocoagent.jar=excludes=*com.abc.package.** -javaagent:*[yourpath/]*jacocoagent.jar=excludes=*com.abc.package.ClassA*
But java-maven-plugin and jacococli accepts '/' convention <configuration> <excludes> <exclude>com/abc/ra/sample/init/*</exclude> </excludes> </configuration> java -jar /Users/mehul/Downloads/org.jacoco.cli-0.8.10-nodeps.jar report /Users/mehul/Repos/mehul/abc/abcService/target/jacoco.exec --classfiles /Users/mehul/Repos/mehul/abc/abcService/target/classes --html ./report On Sunday, 2 July 2023 at 15:11:06 UTC+5:30 Mehul Parmar wrote: > Hello, > Yes, I will get same coverage if I get an exec with all classes and then > filter in report or if I filter in exec itself(agent stage) and then filter > in report. But for big Java projects wanted to skip calculating coverage > and record in exec, so yes a little bit of performance optimizations. > And yes, excluding package in prepare-agent goal worked! > > On Sunday, 2 July 2023 at 13:17:32 UTC+5:30 Evgeny Mandrikov wrote: > >> how to explicit mention that exclude class(prepare-agent) and not java >>> files(report). >>> >>> >> Please refer to the Maven documentation about how to configure plugins - >> you can specify excludes in the configuration of the single goal >> prepare-agent, not for the entire plugin, ie >> >> <configuration> >> <!-- applies to all executions of all goals --> >> </configuration> >> <executions> >> <execution> >> <goals><goal>prepare-agent</goal></goals> >> <configuration> >> <!-- applies only for this execution of this goal --> >> </configuration> >> >>> -- >> Regards, >> Evgeny >> >> -- 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jacoco/68de79c7-5860-43a4-b083-fc4aaf85883an%40googlegroups.com.
