Hello,

I an into a problem, and found the solution:

My pom started out like this:
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-plugin</artifactId>
            <version>2.22.0</version>
            <configuration>
                <excludes>
                    <exclude>**/RunBackendTest.groovy</exclude>
                </excludes>
            </configuration>
        </plugin>

    </plugins>
</build>
This didn’t work in any way!

I copied the pom plugin configuration from this page: 
https://maven.apache.org/surefire/maven-surefire-plugin/examples/inclusion-exclusion.html

But I finally solved the problem. My pom now looks like this:
<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-surefire-plugin</artifactId>
    <version>2.22.0</version>
    <configuration>
        <excludes>
            <exclude>**/RunBackendTest</exclude>
        </excludes>
    </configuration>
</plugin>
See the difference ? No extension on test file! But the above referenced maven 
documentation examples do include the extensions, which clearly does not work.

From above web page:
______________________________________________________________________________
Exclusions
There are certain times when some tests are causing the build to fail. 
Excluding them is one of the best workarounds to continue the build. Exclusions 
can be done by configuring the excludes property of the plugin.

<project>
  [...]
  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>2.22.0</version>
        <configuration>
          <excludes>
            <exclude>**/TestCircle.java</exclude>
            <exclude>**/TestSquare.java</exclude>
          </excludes>
        </configuration>
      </plugin>
    </plugins>
  </build>
  [...]
</project>
______________________________________________________________________________

Consider updating docs.

Best Regards,
Tommy Svensson




Attachment: signature.asc
Description: Message signed with OpenPGP using AMPGpg

Reply via email to