Skip to content

-Dquarkus.args cannot handle more than one argument in command line #10166

@rt-chang

Description

@rt-chang

Describe 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:

  1. Clone example repo
  2. 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 or ver: 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 or gradlew --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

Metadata

Metadata

Assignees

Labels

kind/bugSomething isn't working

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions