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.

quarkus.args not work with gradle and quarkus 2.13.0

See original GitHub issue

Describe the bug

I try to write my own main like that:

@QuarkusMain
public class Main {
    public static void main(String... args) {
        System.out.println(args.length);
    }
}

And execute it using quarkus cli like that

quarkus dev --verbose – param or quarkus dev --verbose -Dquarkus.args=“param”

Expected behavior

The main is executed and display “1”

Actual behavior

The main is executed and display “0”

How to Reproduce?

No response

Output of uname -a or ver

Darwin — 21.5.0 Darwin Kernel Version 21.5.0: Tue Apr 26 21:08:22 PDT 2022; root:xnu-8020.121.3~4/RELEASE_X86_64 x86_64 i386 MacBookPro16,1 Darwin

Output of java -version

1.17

GraalVM version (if different from Java)

2.13.0

Quarkus version or git rev

No response

Build tool (ie. output of mvnw --version or gradlew --version)

7.4.2

Additional information

In verbose mode I can see that parameter is set on quarkus.args but seem not used:

gradlew --console=rich -DquarkusRegistryClient=true quarkusDev -Dquarkus.args=‘param’ -Dio.quarkus.devmode-args=/var/folders/4q/z24jsww13cv73x6jqyqlj_880000gn/T/quarkus-dev2169293274555449898.txt

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:11 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
gleflochcommented, Oct 19, 2022

Yes I think we just don’t forward system property from the gradle process to the quarkus dev process. It should be easy to fix

0reactions
geoandcommented, Nov 10, 2022

I think -- is a shell thing that allows you pass an entire string

Read more comments on GitHub >

github_iconTop Results From Across the Web

Building Quarkus apps with Gradle
To scaffold a Gradle project you can either use the Quarkus CLI or the Quarkus Maven plugin: ... You should not run production...
Read more >
Building applications with Maven - Quarkus
You should not run production application in dev mode. To do this you must build a mutable application, using the mutable-jar format. Set...
Read more >
Building Quarkus apps with Quarkus Command Line Interface ...
The quarkus command lets you create projects, manage extensions and do essential build and dev commands using the underlying project build tool. This...
Read more >
Building a Native Executable - Quarkus
If you cannot install GraalVM, you can use a multi-stage Docker build to run Maven inside a Docker container that embeds GraalVM. There...
Read more >
Configuring Your Application - Quarkus
In this guide, we will learn how to configure a Quarkus application. ... To create a Gradle project, add the --gradle or --gradle-kotlin-dsl...
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