Integration tests on Postgres, allow to skip Unit Tests when running Integration Tests
<java.version>1.8</java.version>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
+ <skipTests>false</skipTests>
+ <skipITs>${skipTests}</skipITs>
+ <skipUTs>${skipTests}</skipUTs>
<!-- child poms should provide a value to tell where the parent is, using plugin.license.parentRelative property.
to explicitly override the plugin config data use plugin.license.configDir. -->
<plugin.license.parentRelative/>
<profile>
<!--* Run Integration Tests (*IT.java) by selecting `integration-tests` Maven profile-->
<!--* Integration Tests are not run if profile is not selected-->
- <!--mvn clean -Pintegration-tests verify-->
+ <!--mvn clean -Pintegration-tests -DskipUTs=true verify-->
<id>integration-tests</id>
<build>
<plugins>
<plugin>
- <!-- Runs JUnit integration tests -->
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <version>2.19.1</version>
+ <configuration>
+ <skipTests>${skipUTs}</skipTests>
+ </configuration>
+ </plugin>
+ <plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
+ <version>2.19.1</version>
<executions>
<execution>
- <id>integration-test</id>
+ <id>run-integration-tests</id>
<phase>integration-test</phase>
- <configuration>
- <includes>
- <include>**/*IT.class</include>
- </includes>
- </configuration>
<goals>
<goal>integration-test</goal>
- </goals>
- </execution>
- <execution>
- <id>verify</id>
- <phase>verify</phase>
- <goals>
- <!-- Will fail the build if there are junit test failures -->
<goal>verify</goal>
</goals>
</execution>
</executions>
+ <configuration>
+ <skipTests>${skipTests}</skipTests>
+ <skipITs>${skipITs}</skipITs>
+ </configuration>
</plugin>
</plugins>
</build>
