diff --git a/spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/AbstractRunMojo.java b/spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/AbstractRunMojo.java index dc08eff497..facacfd496 100644 --- a/spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/AbstractRunMojo.java +++ b/spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/AbstractRunMojo.java @@ -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 diff --git a/spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/StopMojo.java b/spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/StopMojo.java index b6737801ab..87309eb856 100644 --- a/spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/StopMojo.java +++ b/spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/StopMojo.java @@ -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 diff --git a/spring-boot-tools/spring-boot-maven-plugin/src/site/apt/examples/it-skip.apt.vm b/spring-boot-tools/spring-boot-maven-plugin/src/site/apt/examples/it-skip.apt.vm new file mode 100644 index 0000000000..f846bca20c --- /dev/null +++ b/spring-boot-tools/spring-boot-maven-plugin/src/site/apt/examples/it-skip.apt.vm @@ -0,0 +1,63 @@ + ----- + Skip integration tests + ----- + Stephane Nicoll + ----- + 2016-11-25 + ----- + + The <<>> 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 <> goal runs: + +--- + + + false + ... + + ... + + ... + + ... + + ${project.groupId} + ${project.artifactId} + ${project.version} + + + pre-integration-test + + start + + + ${skip.it} + + + + post-integration-test + + stop + + + ${skip.it} + + + + + + org.apache.maven.plugins + maven-failsafe-plugin + + ${skip.it} + + + ... + + ... + +--- + + By default, the integration tests will run but this setup allows you to easily disable + them on the command-line as follows: <<>>. diff --git a/spring-boot-tools/spring-boot-maven-plugin/src/site/apt/index.apt b/spring-boot-tools/spring-boot-maven-plugin/src/site/apt/index.apt index dcf5084405..033d484e26 100644 --- a/spring-boot-tools/spring-boot-maven-plugin/src/site/apt/index.apt +++ b/spring-boot-tools/spring-boot-maven-plugin/src/site/apt/index.apt @@ -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}} diff --git a/spring-boot-tools/spring-boot-maven-plugin/src/site/site.xml b/spring-boot-tools/spring-boot-maven-plugin/src/site/site.xml index 0975cc901d..c3ffb24f30 100644 --- a/spring-boot-tools/spring-boot-maven-plugin/src/site/site.xml +++ b/spring-boot-tools/spring-boot-maven-plugin/src/site/site.xml @@ -12,6 +12,7 @@ +