You can configure this in your pom.xml with the surefire plugin. For example, the following will skip any test with "IT".
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.16</version>
<inherited>true</inherited>
<configuration>
<skip>true</skip>
</configuration>
<executions>
<execution>
<id>unit-tests</id>
<phase>test</phase>
<goals>
<goal>test</goal>
</goals>
<configuration>
<skip>false</skip>
<excludes>
<exclude>**/*IT.java</exclude>
</excludes>
</configuration>
</execution>
</executions>
</plugin>
Steve source
share