Jacoco how to correctly exclude package

I have that and it works (notice that the excludes are in execution/configuration and that everything is in pluginManagement):

<pluginManagement>
    <plugins>
        <plugin>
            <groupId>org.jacoco</groupId>
            <artifactId>jacoco-maven-plugin</artifactId>
            <executions>
                <execution>
                    <id>pre-integration-test</id>
                    <goals>
                        <goal>prepare-agent-integration</goal>
                    </goals>
                    <configuration>
                        <destFile>${project.build.directory}/integration-coverage-reports/jacoco-it.exec</destFile>
                        <excludes>
                            <exclude>weblogic/*</exclude>
                        </excludes>
                    </configuration>
                </execution>
                <execution>
                    <id>post-integration-test</id>
                    <phase>post-integration-test</phase>
                    <goals>
                        <goal>report</goal>
                    </goals>
                    <configuration>
                        <dataFile>${project.build.directory}/integration-coverage-reports/jacoco-it.exec</dataFile>
                        <outputDirectory>${project.reporting.outputDirectory}/jacoco-it</outputDirectory>
                        <excludes>
                            <exclude>my/company/package/db/entity/**/*.class</exclude>
                        </excludes>
                    </configuration>
                </execution>
            </executions>
        </plugin>
    </plugins>
</pluginManagement>

Tags:

Java

Maven

Jacoco