-Dquarkus.args cannot handle more than one argument in command line
See original GitHub issueDescribe the bug
When running applications in Maven with more than one command line argument for -Dquarkus.args
, Quarkus is not capable of handling those arguments and passing them to the application
Expected behavior
In the example code linked below in reproduction steps, the expected behaviour is for the program to take 2 arguments (--name
and --day
) which should produce a message of Hello {name}! Today is {day}
Actual behavior The console outputs help text for either Java or Maven
To Reproduce Steps to reproduce the behavior:
- Clone example repo
- Enter the command
./mvnw quarkus:dev -Dquarkus.args="--name=Bob --day=Monday"
(or any other values for the arguments)
Environment (please complete the following information):
- Output of
uname -a
orver
:Microsoft Windows [Version 10.0.17763.1282]
- Output of
java -version
:
openjdk version "11.0.7" 2020-04-14
OpenJDK Runtime Environment AdoptOpenJDK (build 11.0.7+10)
OpenJDK 64-Bit Server VM AdoptOpenJDK (build 11.0.7+10, mixed mode)
- GraalVM version (if different from Java):
20.1.0
- Quarkus version or git rev:
Quarkus 1.5.2.Final
- Build tool (ie. output of
mvnw --version
orgradlew --version
):Apache Maven 3.6.3
Additional context Also tried the following:
- Attempted to escape the quotes as suggested by @geoand in the Zulip chat (ie.
./mvnw quarkus:dev -Dquarkus.args=\"--name=Bob --day=Monday\"
- Attempted to use commas as delimiters between arguments
Issue Analytics
- State:
- Created 3 years ago
- Comments:12 (2 by maintainers)
Top Results From Across the Web
Quarkus command mode feature - Medium
Start app from IDE Firstly, let's say to our run function if there are no arguments, we don't want to terminate Quarkus, this...
Read more >Introducing Command Mode - Quarkus
When you run with mvn quarkus:dev you can add -Dquarkus.args=yourvalue as arguments you want to pass into the command line. quarkusargs will be ......
Read more >Passing multiple arguments in command line Spring Boot
I need to pass multiple arguments to maven command line to run a spring boot application. This is how I was passing command...
Read more >Home of Quarkus Cheat-Sheet - GitHub Pages
You can inject command line arguments by using @CommandLineArguments annotation: ... Quarkus allow you to have multiple configuration in the same file ...
Read more >picocli - a mighty tiny command line interface
When one of the command line arguments is just two dashes without any characters attached ( -- ), picocli interprets all following arguments...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@gastaldi
I think I spoke too soon, I was working on creating a separate project to recreate it but appears to be working fine on windows.
Carry on 😄
I noticed when looking at the related PR for this feature, that Quarkus handles the arguments differently for quarkus.args versus jvm args. Not sure if this is the root cause though