Document how to specify arguments on the command line with Maven

Closes gh-10926
This commit is contained in:
Stephane Nicoll 2019-06-03 11:37:36 +02:00
parent 684d5a838c
commit 8beb6c1bcb
2 changed files with 17 additions and 15 deletions

View File

@ -16,9 +16,9 @@ build system. If you are just getting started, you might want to read
[[build-tool-plugins-maven-plugin]] [[build-tool-plugins-maven-plugin]]
== Spring Boot Maven Plugin == Spring Boot Maven Plugin
The {spring-boot-maven-plugin-site}[Spring Boot Maven Plugin] provides Spring Boot The Spring Boot Maven Plugin provides Spring Boot support in Maven, letting you package
support in Maven, letting you package executable jar or war archives and run an executable jar or war archives and run an application "`in-place`". To use it, you must
application "`in-place`". To use it, you must use Maven 3.2 (or later). use Maven 3.2 (or later).
NOTE: See the {spring-boot-maven-plugin-site}[Spring Boot Maven Plugin Site] for complete NOTE: See the {spring-boot-maven-plugin-site}[Spring Boot Maven Plugin Site] for complete
plugin documentation. plugin documentation.

View File

@ -130,20 +130,22 @@ Usage
mvn spring-boot:run mvn spring-boot:run
--- ---
By default the application is executed in a forked process. Although this is not By default the application is executed in a forked process and setting properties on the
recommended, it is possible to execute the application directly from the Maven JVM by command-line will not affect the application. If you need to specify some JVM arguments
disabling the <<<fork>>> property. Doing so means that <<<jvmArguments>>>, (i.e. for debugging purposes), you can use the <<<jvmArguments>>> parameter, see
<<<systemPropertyVariables>>>, <<<environmentVariables>>> and <<<agent>>> options are {{{./examples/run-debug.html}Debug the application}} for more details. There is also
ignored. explicit support for {{{./examples/run-system-properties.html}system properties}} and
If you need to specify some JVM arguments (i.e. for debugging purposes), you can use
the <<<jvmArguments>>> parameter, see {{{./examples/run-debug.html}Debug the application}}
for more details. There is also explicit support for
{{{./examples/run-system-properties.html}system properties}} and
{{{./examples/run-env-variables.html}environment variables}}. {{{./examples/run-env-variables.html}environment variables}}.
As a convenience, the profiles to enable are handled by a specific property ( As enabling a profile is quite common, there is dedicated <<<profiles>>> property that
<<<profiles>>>), see {{{./examples/run-profiles.html}Specify active profiles}}. offers a shortcut for
<<<-Dspring-boot.run.jvmArguments="-Dspring.profiles.active=dev">>>,
see {{{./examples/run-profiles.html}Specify active profiles}}.
Although this is not recommended, it is possible to execute the application directly
from the Maven JVM by disabling the <<<fork>>> property. Doing so means that the
<<<jvmArguments>>>, <<<systemPropertyVariables>>>, <<<environmentVariables>>> and
<<<agents>>> options are ignored.
Spring Boot 1.3 has introduced <<<devtools>>>, a module to improve the development-time Spring Boot 1.3 has introduced <<<devtools>>>, a module to improve the development-time
experience when working on Spring Boot applications. To enable it, just add the following experience when working on Spring Boot applications. To enable it, just add the following