0

Require - exclude some methods and exclude some code of lines in a method

1 Answers1

3

As mentioned in the comment, use the exclude/include as part of your configuration.

Here is an example.

Below is an example in which, all classes which has jacocodemo in it is package are included except if they have jacocodemo/strings in them.

<execution>
    <id>jacoco-report</id>
    <goals>
        <goal>report</goal>
    </goals>
    <configuration>
        <includes>
            <include>**/jacocodemo/**/*</include>
        </includes>
        <excludes>
            <exclude>**/jacocodemo/strings/*</exclude>
        </excludes>
    </configuration>
</execution>
Sampada Dubey
  • 359
  • 2
  • 6