question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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

See original GitHub issue

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

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:12 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
hummerpjcommented, Aug 19, 2020

@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 😄

1reaction
rt-changcommented, Jun 22, 2020

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

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found