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 | |
| Enable HTTP URL handler. This allows you to do URL.openConnection() for HTTP URLs. | boolean |
|
| Enable HTTPS URL handler. This allows you to do URL.openConnection() for HTTPS URLs. | boolean |
|
| Add all security services to the native image. | boolean |
|
| Add 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 | |
| Wait 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 |
|
| Publish the debug port when building with docker and debug-build-process is true. | boolean |
|
| Restart the native image server. | boolean |
|
| Enable isolates to improve the memory management. | boolean |
|
| Create a JVM based fallback image if native image fails. | boolean |
|
| Use native image server. This can speed up compilation but can cause changes to drop due to cache invalidation issues. | boolean |
|
| Automatically register all META-INF/services entries. | boolean |
|
| Dump the bytecode of all proxies for inspection. | boolean |
|
| Build 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 | |
| Enable VM introspection in the image. | boolean |
|
| Enable full stack traces in the image. | boolean |
|
| Generate reports on call paths and included packages/classes/methods. | boolean |
|
| Report exceptions with a full stack trace. | boolean |
|
| Report 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 | |
| Enable debug and generate debug symbols in a separate .debug file. | 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.