In a Maven build of a multi module project, sometimes we may want to skip tests for only a specific module. For illustration, let's consider a multi module project with 10 modules and we want to skip tests only for 1 or 2 modules.
In such a scenario, enter the following in that module's pom whose tests we want to skip. We simply set the skipTests tag to true in the maven surefire plugin configuration.
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<skipTests>true</skipTests>
</configuration>
</plugin>
</plugins>
</build>
Until next time, Ciao.
In such a scenario, enter the following in that module's pom whose tests we want to skip. We simply set the skipTests tag to true in the maven surefire plugin configuration.
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<skipTests>true</skipTests>
</configuration>
</plugin>
</plugins>
</build>
Until next time, Ciao.
No comments:
Post a Comment