By default, the Cakupan Plugin will automatically include all test classes with the following wildcard patterns:

  • “**/*TransformationTest.java” - includes all of its subdirectories and all java filenames that start with “TransformationTest”.
  • “**/*XsltTest.java” - includes all of its subdirectories and all java filenames that end with “XsltTest”.

If your test classes do not follow this naming convention, then configure the plugin and specify the tests (or wildcard pattern) you want to include:

<project>
  [...]
  <build>
    <plugins>
      <plugin>
        <groupId>org.nuessler.maven.plugins</groupId>
        <artifactId>cakupan-maven-plugin</artifactId>
        <version>0.7-SNAPSHOT</version>
        <configuration>
          <testIncludes>
            <include>SampleXsltTest.java</include>
          </testIncludes>
        </configuration>
      </plugin>
    </plugins>
  </build>
  [...]
</project>

In certain cases it may be necessary to exclude tests. To achieve this, the plugin can be configured as follows:

<project>
  [...]
  <build>
    <plugins>
      <plugin>
        <groupId>org.nuessler.maven.plugins</groupId>
        <artifactId>cakupan-maven-plugin</artifactId>
        <version>0.7-SNAPSHOT</version>
        <configuration>
          <testExcludes>
            <exclude>SampleXsltTest.java</exclude>
          </testExcludes>
        </configuration>
      </plugin>
    </plugins>
  </build>
  [...]
</project>