Skip to content

Commit fef24a3

Browse files
committed
Merge pull request #25621 from robert-smith-911
* gh-25621: Polish "Document Failsafe configuration when not using starter parent" Document Failsafe configuration when not using starter parent Closes gh-25621
2 parents 9c8a978 + 5a08632 commit fef24a3

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/asciidoc/integration-tests.adoc

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,25 @@ If you need to configure the JMX port, see <<integration-tests-example-jmx-port,
3636

3737
You could also configure a more advanced setup to skip the integration tests when a specific property has been set, see <<integration-tests-example-skip,the dedicated example>>.
3838

39+
40+
41+
[[integration-tests-no-starter-parent]]
42+
=== Using Failsafe Without Spring Boot's Parent POM
43+
Spring Boot's Parent POM, `spring-boot-starter-parent`, configures Failsafe's `<classesDirectory>` to be `${project.build.outputDirectory}`.
44+
Without this configuration, which causes Failsafe to use the compiled classes rather than the repackaged jar, Failsafe cannot load your application's classes.
45+
If you are not using the parent POM, you should configure Failsafe in the same way, as shown in the following example:
46+
47+
[source,xml,indent=0,subs="verbatim,attributes"]
48+
----
49+
<plugin>
50+
<groupId>org.apache.maven.plugins</groupId>
51+
<artifactId>maven-failsafe-plugin</artifactId>
52+
<configuration>
53+
<classesDirectory>${project.build.outputDirectory}</classesDirectory>
54+
</configuration>
55+
</plugin>
56+
----
57+
3958
include::goals/start.adoc[leveloffset=+1]
4059

4160
include::goals/stop.adoc[leveloffset=+1]

0 commit comments

Comments
 (0)