Polish "Document Failsafe configuration when not using starter parent"
See gh-25621
This commit is contained in:
@@ -36,6 +36,25 @@ If you need to configure the JMX port, see <<integration-tests-example-jmx-port,
|
||||
|
||||
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>>.
|
||||
|
||||
|
||||
|
||||
[[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 `<classesDirectory>` 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"]
|
||||
----
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-failsafe-plugin</artifactId>
|
||||
<configuration>
|
||||
<classesDirectory>${project.build.outputDirectory}</classesDirectory>
|
||||
</configuration>
|
||||
</plugin>
|
||||
----
|
||||
|
||||
include::goals/start.adoc[leveloffset=+1]
|
||||
|
||||
include::goals/stop.adoc[leveloffset=+1]
|
||||
|
||||
@@ -105,21 +105,6 @@ For instance, to use a different version of the SLF4J library and the Spring Dat
|
||||
</dependencyManagement>
|
||||
----
|
||||
|
||||
[[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 `<classesDirectory>` to be `${project.build.outputDirectory}`.
|
||||
This configures Failsafe to use the compiled classes rather than the repackaged jar as such:
|
||||
|
||||
[source,xml,indent=0]
|
||||
----
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-failsafe-plugin</artifactId>
|
||||
<configuration>
|
||||
<classesDirectory>${project.build.outputDirectory}</classesDirectory>
|
||||
</configuration>
|
||||
</plugin>
|
||||
----
|
||||
|
||||
|
||||
[[using-overriding-command-line]]
|
||||
|
||||
Reference in New Issue
Block a user