From 6c016663fdd78308f17dd9895ede593d85890f8d Mon Sep 17 00:00:00 2001 From: Stephane Nicoll Date: Thu, 26 Dec 2019 11:17:51 +0100 Subject: [PATCH] Polish contribution See gh-18711 --- .../springframework/boot/maven/AbstractRunMojo.java | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/AbstractRunMojo.java b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/AbstractRunMojo.java index ca6929cd61..b76a6e9588 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/AbstractRunMojo.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/AbstractRunMojo.java @@ -133,19 +133,20 @@ public abstract class AbstractRunMojo extends AbstractDependencyFilterMojo { private Map environmentVariables; /** - * Arguments that should be passed to the application. On command line use spaces to - * separate multiple arguments and make sure to wrap multiple values between quotes. + * Arguments that should be passed to the application. * @since 1.0.0 */ @Parameter private String[] arguments; /** - * Arguments from command line that should be passed to the application. - * @since 2.2.1 + * Arguments from the command line that should be passed to the application. Use + * spaces to separate multiple arguments and make sure to wrap multiple values between + * quotes. When specified, takes precedence over {@link #arguments}. + * @since 2.2.3 */ @Parameter(property = "spring-boot.run.arguments", readonly = true) - private String args; + private String commandlineArguments; /** * The spring profiles to activate. Convenience shortcut of specifying the @@ -318,7 +319,7 @@ public abstract class AbstractRunMojo extends AbstractDependencyFilterMojo { * @return a {@link RunArguments} defining the application arguments */ protected RunArguments resolveApplicationArguments() { - RunArguments runArguments = (this.args != null) ? new RunArguments(this.args) + RunArguments runArguments = (this.commandlineArguments != null) ? new RunArguments(this.commandlineArguments) : new RunArguments(this.arguments); addActiveProfileArgument(runArguments); return runArguments;