From 0d79fd3e01a207d8daec4047af452d070ccb8fdf Mon Sep 17 00:00:00 2001 From: robert-smith-911 Date: Sun, 14 Mar 2021 22:08:07 -0400 Subject: [PATCH 1/2] Document Failsafe configuration when not using starter parent See gh-25621 --- .../src/docs/asciidoc/using.adoc | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/asciidoc/using.adoc b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/asciidoc/using.adoc index e8e6cf1b5d..9a24a2aa49 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/asciidoc/using.adoc +++ b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/asciidoc/using.adoc @@ -105,6 +105,21 @@ For instance, to use a different version of the SLF4J library and the Spring Dat ---- +[[failsafe-plugin]] +=== Using Maven Failsafe Plugin without the Spring Boot Parent POM +When using the Failsafe plugin, the Spring Boot Parent POM by default configures the `` to be `${project.build.outputDirectory}`. +This configures Failsafe to use the compiled classes rather than the repackaged jar as such: + +[source,xml,indent=0] +---- + + org.apache.maven.plugins + maven-failsafe-plugin + + ${project.build.outputDirectory} + + +---- [[using-overriding-command-line]] From 5a086321c6ac7d9d13b78ec3bc46ea6eb1743848 Mon Sep 17 00:00:00 2001 From: Andy Wilkinson Date: Tue, 30 Mar 2021 18:10:41 +0100 Subject: [PATCH 2/2] Polish "Document Failsafe configuration when not using starter parent" See gh-25621 --- .../src/docs/asciidoc/integration-tests.adoc | 19 +++++++++++++++++++ .../src/docs/asciidoc/using.adoc | 15 --------------- 2 files changed, 19 insertions(+), 15 deletions(-) diff --git a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/asciidoc/integration-tests.adoc b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/asciidoc/integration-tests.adoc index ec9aa9d044..c813123ea1 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/asciidoc/integration-tests.adoc +++ b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/asciidoc/integration-tests.adoc @@ -36,6 +36,25 @@ If you need to configure the JMX port, see <>. + + +[[integration-tests-no-starter-parent]] +=== Using Failsafe Without Spring Boot's Parent POM +Spring Boot's Parent POM, `spring-boot-starter-parent`, configures Failsafe's `` to be `${project.build.outputDirectory}`. +Without this configuration, which causes Failsafe to use the compiled classes rather than the repackaged jar, Failsafe cannot load your application's classes. +If you are not using the parent POM, you should configure Failsafe in the same way, as shown in the following example: + +[source,xml,indent=0,subs="verbatim,attributes"] +---- + + org.apache.maven.plugins + maven-failsafe-plugin + + ${project.build.outputDirectory} + + +---- + include::goals/start.adoc[leveloffset=+1] include::goals/stop.adoc[leveloffset=+1] diff --git a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/asciidoc/using.adoc b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/asciidoc/using.adoc index 9a24a2aa49..e8e6cf1b5d 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/asciidoc/using.adoc +++ b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/asciidoc/using.adoc @@ -105,21 +105,6 @@ For instance, to use a different version of the SLF4J library and the Spring Dat ---- -[[failsafe-plugin]] -=== Using Maven Failsafe Plugin without the Spring Boot Parent POM -When using the Failsafe plugin, the Spring Boot Parent POM by default configures the `` to be `${project.build.outputDirectory}`. -This configures Failsafe to use the compiled classes rather than the repackaged jar as such: - -[source,xml,indent=0] ----- - - org.apache.maven.plugins - maven-failsafe-plugin - - ${project.build.outputDirectory} - - ----- [[using-overriding-command-line]]