Skip to content

Instantly share code, notes, and snippets.

@jvmops
Last active February 16, 2018 23:44
Show Gist options
  • Save jvmops/d97188d6d1eeea0a0e869cb3d4928bcc to your computer and use it in GitHub Desktop.
Save jvmops/d97188d6d1eeea0a0e869cb3d4928bcc to your computer and use it in GitHub Desktop.
Maven - ignoring integration tests
@Category(IntegrationTest.class)
public class ExampleTest {
@Test
public void im_slow() {
}
}
public interface IntegrationTest {}
...
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<includes>
<include>**/*.java</include>
</includes>
<argLine>-Dfile.encoding=UTF-8</argLine>
<skipTests>${skip.unit.tests}</skipTests>
<excludedGroups>com.jvmops.tests.annotations.IntegrationTest</excludedGroups>
</configuration>
</plugin>
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment