Merge branch '1.5.x'

pull/7175/merge
Stephane Nicoll 8 years ago
commit 2964e31186

@ -167,7 +167,7 @@ public abstract class AbstractRunMojo extends AbstractDependencyFilterMojo {
* Skip the execution.
* @since 1.3.2
*/
@Parameter(defaultValue = "false")
@Parameter(property = "skip", defaultValue = "false")
private boolean skip;
@Override

@ -75,7 +75,7 @@ public class StopMojo extends AbstractMojo {
* Skip the execution.
* @since 1.3.2
*/
@Parameter(defaultValue = "false")
@Parameter(property = "skip", defaultValue = "false")
private boolean skip;
@Override

@ -0,0 +1,63 @@
-----
Skip integration tests
-----
Stephane Nicoll
-----
2016-11-25
-----
The <<<skip>>> property allows to skip the execution of the Spring Boot maven plugin
altogether. This example shows how you can skip integration tests with a command-line
property and still make sure that the <<repackage>> goal runs:
---
<project>
<properties>
<skip.it>false</skip.it>
...
</properties>
...
<build>
...
<plugins>
...
<plugin>
<groupId>${project.groupId}</groupId>
<artifactId>${project.artifactId}</artifactId>
<version>${project.version}</version>
<executions>
<execution>
<id>pre-integration-test</id>
<goals>
<goal>start</goal>
</goals>
<configuration>
<skip>${skip.it}</skip>
</configuration>
</execution>
<execution>
<id>post-integration-test</id>
<goals>
<goal>stop</goal>
</goals>
<configuration>
<skip>${skip.it}</skip>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<configuration>
<skip>${skip.it}</skip>
</configuration>
</plugin>
...
</plugins>
...
</build>
---
By default, the integration tests will run but this setup allows you to easily disable
them on the command-line as follows: <<<mvn verify -Dskip.it=true>>>.

@ -54,6 +54,8 @@ Spring Boot Maven Plugin
* {{{./examples/it-random-port.html}Random port for integration tests}}
* {{{./examples/it-skip.html}Skip integration tests}}
* {{{./examples/run-profiles.html}Specify active profiles}}
* {{{./examples/build-info.html}Generate build information}}

@ -12,6 +12,7 @@
<item name="Exclude a dependency" href="examples/exclude-dependency.html"/>
<item name="Debug the application" href="examples/run-debug.html"/>
<item name="Random port for integration tests" href="examples/it-random-port.html"/>
<item name="Skip integration tests" href="examples/it-skip.html"/>
<item name="Specify active profiles" href="examples/run-profiles.html"/>
<item name="Generate build information" href="examples/build-info.html"/>
</menu>

Loading…
Cancel
Save