We need to use AspectJ compile time weaving and that is creating the AjcClosure classes. Somehow the package weaving is not working for us. We need to exclude these AjcClosure classes from the coverage calculation in jacoco maven plugin as it has reduced the coverage to half.
We tried
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.5</version>
<configuration>
<excludes>
<exclude>**/*Aspect*.*</exclude>
<exclude>**/*AjcClosure*.*</exclude>
</excludes>
</configuration>
<executions>
<execution>
<id>prepare-agent</id>
<goals>
<goal>prepare-agent</goal>
</goals>
</execution>
</executions>
</plugin>
However, it is not coming in the report but the coverage is still half. I will be really grateful if we can have a way out.