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

quarkus:run to support arguments and property setting #46001

Open
maxandersen opened this issue Jan 31, 2025 · 3 comments · May be fixed by #46011
Open

quarkus:run to support arguments and property setting #46001

maxandersen opened this issue Jan 31, 2025 · 3 comments · May be fixed by #46011
Labels
area/devtools Issues/PR related to maven, gradle, platform and cli tooling/plugins kind/enhancement New feature or request

Comments

@maxandersen
Copy link
Member

Describe the bug

quarkus:run does not seem to support setting properties nor command line arguments.

command line

mvn quarkus:dev -Dquarkus.args=". ~/code result in "." and "~/.code" being passed as arguments to the running app but mvn quarkus:run -Dquarkus.args=". ~/code" seem to have no effect.

quarkus run also does not seem to honor it. I would expect quarkus run -- . ~/code or similar to work as a way to pass in arguments but I thnk because neither maven nor gradle supports a way quarkus run is not able to do it.

properties

Not sure how this should work to be honest as quarkus:run is meant to be running the app fairly isolated but somehow mvn -Dquarkus.someproperty -Dfileserver.paths=.. quarkus:run would be nice to honor ...but also not sure blindly sending all build system properties over to quarkus:run is meaningful.

if not, we should at least document to use .env or env variables instead.

Expected behavior

No response

Actual behavior

No response

How to Reproduce?

No response

Output of uname -a or ver

No response

Output of java -version

No response

Quarkus version or git rev

No response

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

No response

Additional information

No response

@maxandersen maxandersen added the kind/bug Something isn't working label Jan 31, 2025
@geoand geoand added area/devtools Issues/PR related to maven, gradle, platform and cli tooling/plugins and removed triage/needs-triage labels Jan 31, 2025
@geoand
Copy link
Contributor

geoand commented Jan 31, 2025

We could do what we do in DevMojo:

    /**
     * Allows configuring arbitrary JVM arguments. Multiple arguments can be specified by delimiting them with a space
     * character.
     */
    @Parameter(defaultValue = "${jvm.args}")
    private String jvmArgs;

    @Parameter(defaultValue = "${quarkus.args}")
    private String argsString;

    @Parameter
    private Map<String, String> environmentVariables = Map.of();

    @Parameter
    private Map<String, String> systemProperties = Map.of();

@gsmet gsmet added kind/enhancement New feature or request and removed kind/bug Something isn't working labels Jan 31, 2025
@geoand
Copy link
Contributor

geoand commented Jan 31, 2025

We actually have systemProperties already

geoand added a commit to geoand/quarkus that referenced this issue Jan 31, 2025
@geoand geoand linked a pull request Jan 31, 2025 that will close this issue
@geoand
Copy link
Contributor

geoand commented Jan 31, 2025

@maxandersen do you want to try #46011?

geoand added a commit to geoand/quarkus that referenced this issue Jan 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/devtools Issues/PR related to maven, gradle, platform and cli tooling/plugins kind/enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants