Chapter 3. Native executable configuration properties
Configuration properties define how the native executable is generated. You can configure your Quarkus application using the application.properties
file.
Configuration properties
The following table lists the configuration properties that you can set to define how the native executable is generated:
Property | Description | Type | Default |
---|---|---|---|
| Additional arguments to pass to the build process. | list of string | |
| Enables HTTP URL handler. This allows you to do URL.openConnection() for HTTP URLs. | boolean |
|
| Enables HTTPS URL handler. This allows you to do URL.openConnection() for HTTPS URLs. | boolean |
|
| Adds all security services to the native image. | boolean |
|
| Adds all character sets to the native image. This increases image size. | boolean |
|
| Contains the path of the Graal distribution. | string |
|
| Contains the path of the JDK. |
| |
| The maximum Java heap used to generate the native image. | string | |
| Waits for a debugger to attach to the build process before running the native image build. This is an advanced option for those familiar with GraalVM internals. | boolean |
|
| Publishes the debug port when building with docker and debug-build-process is true. | boolean |
|
| Restarts the native image server. | boolean |
|
| Enables isolates to improve the memory management. | boolean |
|
| Creates a JVM based fallback image if native image fails. | boolean |
|
| Uses native image server. This can speed up compilation but can cause changes to drop due to cache invalidation issues. | boolean |
|
| Automatically registers all META-INF/services entries. | boolean |
|
| Dumps the bytecode of all proxies for inspection. | boolean |
|
| Builds using a container runtime. Docker is used by default. | boolean |
|
| The docker image to build the image. | string |
|
| The container runtime used build the image. For example, Docker. | string | |
| Options to pass to the container runtime. | list of string | |
| Enables VM introspection in the image. | boolean |
|
| Enables full stack traces in the image. | boolean |
|
| Generates reports on call paths and included packages/classes/methods. | boolean |
|
| Reports exceptions with a full stack trace. | boolean |
|
| Reports errors at runtime. This may cause your application to fail at runtime if you are using unsupported feature. | boolean |
|
|
A comma separated list of globs to match resource paths that should be added to the native image. Use slash ( | list of string | |
|
Enables debug and generates debug symbols in a separate .debug file. When used with | boolean |
|
Supported glob features and its description
The following table lists the supported glob features and its description:
Character | Feature description |
|
Matches a possibly empty sequence of characters that does not contain slash ( |
|
Matches a possibly empty sequence of characters that might contain slash ( |
| Matches one character, but not slash. |
| Matches one character from the range specified in the bracket, but not slash. |
| Matches one character from the range specified in the bracket, but not slash. |
| Matches one character not specified in the bracket; does not match slash. |
| Matches one character outside the range specified in the bracket; does not match slash. |
| Matches any of the alternating tokens separated by comma; the tokens may contain wildcards, nested alternations and ranges. |
|
The escape character. There are three levels of escaping: |
Additional resources
3.1. Configuring memory consumption for Quarkus native compilation
Compiling a Quarkus application to a native executable consumes a lot of memory during analysis and optimization. You can limit the amount of memory used during native compilation by setting the quarkus.native.native-image-xmx
configuration property. Setting low memory limits might increase the build time.
Procedure
Use one of the following methods to set a value for the
quarkus.native.native-image-xmx
property to limit the memory consumption during the native image build time:Using the
application.properties
file:quarkus.native.native-image-xmx=<maximum_memory>
Setting system properties:
mvn -Pnative -Dquarkus.native.container-build=true -Dquarkus.native.native-image-xmx=<maximum_memory>
This command builds the native executable with Docker. Add
-Dquarkus.native.container-runtime=podman
argument to use Podman.
For example, to set the memory limit to 6 GB, enter quarkus.native.native-image-xmx=6g
. The value must be a multiple of 1024 greater than 2MB. Append the letter m or M to indicate megabytes, or g or G to indicate gigabytes.