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 5c274d365d85..81f5f4391502 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 @@ -32,6 +32,9 @@ To make sure that the lifecycle of your Spring Boot application is properly mana Such setup can now use the https://maven.apache.org/surefire/maven-failsafe-plugin[failsafe-plugin] to run your integration tests as you would expect. +NOTE: By default, the application is started in a separate process and JMX is used to communicate with the application. +If you need to configure the JMX port, see <>. + You could also configure a more advanced setup to skip the integration tests when a specific property has been set, see <>. include::goals/start.adoc[leveloffset=+1] @@ -119,6 +122,54 @@ You can now retrieve the `test.server.port` system property in any of your integ +[[integration-tests-example-jmx-port]] +==== Customize JMX port +The `jmxPort` property allows to customize the port the plugin uses to communicate with the Spring Boot application. + +This example shows how you can customize the port in case `9001` is already used: + +[source,xml,indent=0,subs="verbatim,attributes"] +---- + + + + + org.springframework.boot + spring-boot-maven-plugin + {gradle-project-version} + + 9009 + + + + pre-integration-test + + start + + + ${skip.it} + + + + post-integration-test + + stop + + + ${skip.it} + + + + + + + +---- + +TIP: If you need to configure the JMX port, make sure to do so in the global configuration as shown above so that it is shared by both goals. + + + [[integration-tests-example-skip]] ==== Skip Integration Tests The `skip` property allows to skip the execution of the Spring Boot maven plugin altogether.