Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document spring-boot.run.arguments behaviour with multiple arguments #19998

Closed
ebussieres opened this issue Jan 31, 2020 · 4 comments
Closed
Assignees
Labels
type: documentation A documentation update
Milestone

Comments

@ebussieres
Copy link

ebussieres commented Jan 31, 2020

Since version 2.2.3.RELEASE, I have a regression when using command line arguments from Maven plugin.

When I use the maven plugin and pass multiple arguments, the args array contains only one value. For example, if I use the following command line, the array will containe only one value.

mvn spring-boot:run -Dspring-boot.run.arguments="param1,param2"

It was working with version 2.2.2.RELEASE

An example can be found here : https://github.com/ebussieres/spring-boot-run-bug

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Jan 31, 2020
@snicoll
Copy link
Member

snicoll commented Jan 31, 2020

Thanks for the report. That's an effect of fixing a bug that harmonize how such an argument should be processed on the command-line, see #18711.

Arguments on the command line have to be separated by a space (to allow commas to be used in the value itself).

mvn spring-boot:run -Dspring-boot.run.arguments="param1 param2"

This is documented but for some reasons I can't see that being reflected on the generated web site so we'll use this issue to improve that.

@snicoll snicoll added type: documentation A documentation update and removed status: waiting-for-triage An issue we've not yet triaged labels Jan 31, 2020
@snicoll snicoll added this to the 2.2.x milestone Jan 31, 2020
@ebussieres
Copy link
Author

ebussieres commented Jan 31, 2020

And if my parameter contains space, does it have a workaround ?

@snicoll
Copy link
Member

snicoll commented Jan 31, 2020

It's also specified in the doc that's supposed to show up. You need to quote it.

What I meant by harmonizing is that we now use the same mechanism as any other Maven plugin does so there are plenty of resources online about that stuff.

@snicoll snicoll changed the title Multiple arguments when using command line arguments from Maven plugin Document spring-boot.run.arguments behaviour with multiple arguments Jan 31, 2020
@snicoll snicoll self-assigned this Feb 11, 2020
@snicoll snicoll modified the milestones: 2.2.x, 2.2.5 Feb 11, 2020
@glmars
Copy link

glmars commented Jul 3, 2020

@snicoll Unfortunately, these breaking changes still aren't documented in the Spring Boot 2.2 Release Notes 😬

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: documentation A documentation update
Projects
None yet
Development

No branches or pull requests

4 participants