Please read documentation 
https://www.jacoco.org/jacoco/trunk/doc/report-mojo.html#excludes
which states that excludes property of report goal refers to class files 
and not to source files:
A list of *class files* to exclude from the report

Instead
<exclude>**/src/main/java/abc/*.java</exclude>
you probably need
<exclude>abc/*.class</exclude>


On Wednesday, December 16, 2020 at 3:58:50 PM UTC+1 delcorny wrote:

> Hello,
>
> I have an multi module maven project and and want to define excludes in 
> the parent pom. I did some entries but there is no effect. When I check the 
> site/jacoco/index.hmtl I still see measurements in the module I have 
> excludes (i.e. abc ). For other modules I also found that coding in  
> **/test/abc.java has been scanned. 
>
> <profile>
> <!-- Code Coverage - Jacoco -->
> <id>codecoverage</id>
> <build>
> <plugins>
> <plugin>
> <groupId>org.jacoco</groupId>
> <artifactId>jacoco-maven-plugin</artifactId>
> <version>0.8.4</version>
> <configuration>
> <excludes>
> <exclude>**/src/main/java/abc/*.java</exclude>
> <exclude>**/test/**</exclude>
> </excludes>
> </configuration>
> <executions>
> <execution>
> <id>pre-unit-test</id>
> <goals>
> <goal>prepare-agent</goal>
> </goals>
> </execution>
> <execution>
> <id>post-unit-test</id>
> <phase>test</phase>
> <goals>
> <goal>report</goal>
> </goals>
> </execution>
> </executions>
> </plugin>
> </plugins>
> </build>
> </profile>
>

-- 
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/b230223a-d006-424f-a497-7fd15a330752n%40googlegroups.com.

Reply via email to