0

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

2
  • Which things have you tried that have not worked for you? Commented May 18, 2022 at 17:05
  • worked exclude method, <configuration> <excludes> <exclude>**/*Sample.class</exclude> </excludes> </configuration> But want to exclude some specified lines in methods Commented May 18, 2022 at 17:13

1 Answer 1

2

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>
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.