Commit 8beb6c1b authored by Stephane Nicoll's avatar Stephane Nicoll

Document how to specify arguments on the command line with Maven

Closes gh-10926
parent 684d5a83
...@@ -16,9 +16,9 @@ build system. If you are just getting started, you might want to read ...@@ -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.
......
...@@ -130,20 +130,22 @@ Usage ...@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment