Searching...
Thursday, 19 September 2013

How to skip tests in Maven

08:55

There are two ways we can skip the tests in maven

1. Using skipTests option pom.xml

<build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>2.15</version>
        <configuration>
          <skipTests>true</skipTests>
        </configuration>
      </plugin>
    </plugins>
  </build>

2. Skip tests as argument (During command line maven install)

$ mvn install -Dmaven.test.skip=true

0 comments: