Uncategorized

Disabling tests in Maven

Sometimes you want to disable tests in Maven, f.ex integration tests that you need to just do quick tests against an external component. These are brittle tests and should therefore not be part of the automatic build …..


Here is how to diable such tests from the maven build

<plugin>
	<groupId>org.apache.maven.plugins</groupId>
	<artifactId>maven-surefire-plugin</artifactId>
	<configuration>
	<excludes>
		<exclude>**/IntegrationTest.java</exclude>
	</excludes>
	</configuration>
</plugin>

Here is a complete description of the surefire plugin

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s