How to ignore inner/nested classes with JaCoCo?

Torque :

I'm trying to ignore some generated classes, and the classes get ignored fine. But if those classes have inner classes, those classes still get included, despite the parent class being excluded. This is my configuration:

<plugin>
    <groupId>org.jacoco</groupId>
    <artifactId>jacoco-maven-plugin</artifactId>
    <version>0.7.9</version>
    <executions>
        <execution>
            <goals>
                <goal>prepare-agent</goal>
            </goals>
        </execution>
        <execution>
            <id>report</id>
            <phase>prepare-package</phase>
            <goals>
                <goal>report</goal>
            </goals>
            <configuration>
                <excludes>
                    <exclude>**/*DB.*</exclude>
                    <exclude>**/*DTO.*</exclude>
                </excludes>
            </configuration>
        </execution>
    </executions>
</plugin>

Attempting to use the standard Java name convention of ParentClass.NestedClass by excluding **/*DB.*.* did not help.

Torque :

After some searching, I found the answer myself. As it wasn't easily googleable, I'm putting it here for posterity's sake:

The syntax mirrors that of the compiled Java naming convention:

<configuration>
    <excludes>
        <exclude>**/*DB.*</exclude>
        <exclude>**/*DB$*.*</exclude>
        <exclude>**/*DTO.*</exclude>
        <exclude>**/*DTO$*.*</exclude>
    </excludes>
</configuration>

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=458336&siteId=1