If I have this in my pom.xml (Spring Boot 2.7.4):

<configuration>
  <arguments>
    <argument>--oh_hello=there</argument>
  </arguments>
</configuration>

At application startup I dump the arguments seen. I cannot override the arguments on the command line by for example using mvn spring-boot:run -Dspring-boot.run.arguments="--hello=world" (I expect "hello=world", or maybe both, but not only "oh_hello=there").

The arguments seen when the Spring applications starts are stuck at what is specified in pom.xml. I expect to be able to override this.

The documentation states:

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 #arguments.

A full example is on GitHub.

I've tried to ask on StackOverflow, but did not get useful feedback.

Comment From: wilkinsona

This is the standard way of doing things in Maven, unfortunately. Please see https://github.com/spring-projects/spring-boot/issues/21536 for some more details along with this section of the plugin's docs.