Skip to content

Allow "appending" quarkus.native.additional-build-args #47762

@zakkak

Description

@zakkak

Description

quarkus.native.additional-build-args allows us to pass more arguments to GraalVM/Mandrel and customize the build. This enables us to try new features without altering Quarkus core, e.g. we can pass --exact-reachability-metadata.

The problem is that if quarkus.native.additional-build-args is defined in the application.properties file, defining it in the command line overrides the value. As a result if an application of test needs some specific build arguments that it defines in its application.properties file, e.g.:

quarkus.native.additional-build-args=-H:IncludeResources=.*\\.pem

there is no way to pass some additional argument without either:

  • copying the arguments from the properties file to the command line, or
  • adding the arguments to the properties file.

For ease of testing and experimentation I would like to be able to append (or prepend) arguments to the ones defined in the properties files.

Such a feature would also allow us to work around issues like #47566 till a proper fix gets merged.

Implementation ideas

AFAIK there is no way to append the value of a property in maven (not sure about gradle, but even if possible we need something compatible with maven as well).

My proposal is to create a new property quarkus.native.additional-build-args-append that will be meant for CLI use and will act like the JAVA_OPTS_APPEND environment variable.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions