Package io.quarkus.deployment.pkg
Interface NativeConfig
-
@ConfigRoot(phase=BUILD_TIME) @ConfigMapping(prefix="quarkus.native") public interface NativeConfig
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classNativeConfig.BuilderImageProviderSupported Builder Image providers/distributionsstatic interfaceNativeConfig.Compressionstatic interfaceNativeConfig.Debugstatic classNativeConfig.MonitoringOptionstatic interfaceNativeConfig.ResourcesConfig
-
Field Summary
Fields Modifier and Type Field Description static StringDEFAULT_GRAALVM_BUILDER_IMAGEstatic StringDEFAULT_MANDREL_BUILDER_IMAGE
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description booleanaddAllCharsets()If all character sets should be added to the native image.Optional<List<String>>additionalBuildArgs()Comma-separated, additional arguments to pass to the build process.booleanautoServiceLoaderRegistration()If all META-INF/services entries should be automatically registeredStringbuilderImage()The docker image to use to do the image build.booleancleanupServer()Deprecated.Since GraalVM 20.2.0 the native image server has become an experimental feature and is disabled by default.NativeConfig.Compressioncompression()Configure native executable compression using UPX.Optional<Boolean>containerBuild()If this build should be done using a container runtime.Optional<ContainerRuntimeUtil.ContainerRuntime>containerRuntime()The container runtime (e.g.Optional<List<String>>containerRuntimeOptions()Options to pass to the container runtimeNativeConfig.Debugdebug()Debugging options.booleandebugBuildProcess()If the native image build should wait for a debugger to be attached before running.booleandumpProxies()If the bytecode of all proxies should be dumped for inspectionbooleanenableAllSecurityServices()Deprecated.--enable-all-security-serviceswas removed in GraalVM 21.1 https://github.com/oracle/graal/pull/3258booleanenableDashboardDump()Generate the report files for GraalVM Dashboard.booleanenableFallbackImages()If a JVM based 'fallback image' should be created if native image fails.booleanenableHttpsUrlHandler()If the HTTPS url handler should be enabled, allowing you to do URL.openConnection() for HTTPS URLsbooleanenableHttpUrlHandler()If the HTTP url handler should be enabled, allowing you to do URL.openConnection() for HTTP URLsbooleanenableIsolates()If isolates should be enabledbooleanenableJni()Deprecated.JNI is always enabled starting from GraalVM 19.3.1.booleanenableReports()If the reports on call paths and included packages/classes/methods should be generatedbooleanenableServer()Deprecated.This used to be the default prior to GraalVM 20.2.0 and this configuration item was used to disable it as it was not stable.booleanenableVmInspection()Deprecated.Usequarkus.native.monitoringinstead.@WithConverter(io.quarkus.runtime.configuration.TrimmedStringConverter.class) StringfileEncoding()Defines the file encoding as in-Dfile.encoding=....booleanfullStackTraces()If full stack traces are enabled in the resulting imagedefault StringgetEffectiveBuilderImage()Optional<String>graalvmHome()The location of the Graal distributionbooleanheadless()The default value for java.awt.headless JVM option.booleaninlineBeforeAnalysis()Deprecated.inlineBeforeAnalysis is always enabled starting from GraalVM 21.3.default booleanisExplicitContainerBuild()FilejavaHome()The location of the JDKOptional<List<NativeConfig.MonitoringOption>>monitoring()Enable monitoring various monitoring options.Optional<String>nativeImageXmx()The maximum Java heap to be used during the native image generationbooleanpublishDebugBuildProcessPort()If the debug port should be published when building with docker and debug-build-process is truebooleanremoteContainerBuild()If this build is done using a remote docker daemon.booleanreportErrorsAtRuntime()If errors should be reported at runtime.booleanreportExceptionStackTraces()If exceptions should be reported with a full stack traceNativeConfig.ResourcesConfigresources()Build time configuration options for resources inclusion in the native executable.booleanreuseExisting()Don't build a native image if it already exists.@WithConverter(io.quarkus.runtime.configuration.TrimmedStringConverter.class) Optional<String>userCountry()Deprecated.Use the global quarkus.default-locale.@WithConverter(io.quarkus.runtime.configuration.TrimmedStringConverter.class) Optional<String>userLanguage()Deprecated.Use the global quarkus.default-locale.
-
-
-
Field Detail
-
DEFAULT_GRAALVM_BUILDER_IMAGE
static final String DEFAULT_GRAALVM_BUILDER_IMAGE
- See Also:
- Constant Field Values
-
DEFAULT_MANDREL_BUILDER_IMAGE
static final String DEFAULT_MANDREL_BUILDER_IMAGE
- See Also:
- Constant Field Values
-
-
Method Detail
-
additionalBuildArgs
Optional<List<String>> additionalBuildArgs()
Comma-separated, additional arguments to pass to the build process. If an argument includes the,symbol, it needs to be escaped, e.g.\\,
-
enableHttpUrlHandler
@WithDefault("true") boolean enableHttpUrlHandler()If the HTTP url handler should be enabled, allowing you to do URL.openConnection() for HTTP URLs
-
enableHttpsUrlHandler
@WithDefault("false") boolean enableHttpsUrlHandler()If the HTTPS url handler should be enabled, allowing you to do URL.openConnection() for HTTPS URLs
-
enableAllSecurityServices
@WithDefault("false") @Deprecated boolean enableAllSecurityServices()Deprecated.--enable-all-security-serviceswas removed in GraalVM 21.1 https://github.com/oracle/graal/pull/3258If all security services should be added to the native image
-
inlineBeforeAnalysis
@Deprecated @WithDefault("true") boolean inlineBeforeAnalysis()
Deprecated.inlineBeforeAnalysis is always enabled starting from GraalVM 21.3.If-H:+InlineBeforeAnalysisflag will be added to the native-image run
-
enableJni
@Deprecated @WithDefault("true") boolean enableJni()
Deprecated.JNI is always enabled starting from GraalVM 19.3.1.
-
headless
@WithDefault("true") boolean headless()The default value for java.awt.headless JVM option. Switching this option affects linking of awt libraries.
-
userLanguage
@WithConverter(io.quarkus.runtime.configuration.TrimmedStringConverter.class) @Deprecated @WithConverter(io.quarkus.runtime.configuration.TrimmedStringConverter.class) Optional<String> userLanguage()
Deprecated.Use the global quarkus.default-locale.Defines the user language used for building the native executable. It also serves as the default Locale language for the native executable application runtime. e.g. en or cs as defined by IETF BCP 47 language tags.
-
userCountry
@WithConverter(io.quarkus.runtime.configuration.TrimmedStringConverter.class) @Deprecated @WithConverter(io.quarkus.runtime.configuration.TrimmedStringConverter.class) Optional<String> userCountry()
Deprecated.Use the global quarkus.default-locale.Defines the user country used for building the native executable. It also serves as the default Locale country for the native executable application runtime. e.g. US or FR as defined by ISO 3166-1 alpha-2 codes.
-
fileEncoding
@WithDefault("UTF-8") @WithConverter(io.quarkus.runtime.configuration.TrimmedStringConverter.class) @WithConverter(io.quarkus.runtime.configuration.TrimmedStringConverter.class) String fileEncoding()Defines the file encoding as in-Dfile.encoding=.... Native image runtime uses the host's (i.e. build time) value offile.encodingsystem property. We intentionally default this to UTF-8 to avoid platform specific defaults to be picked up which can then result in inconsistent behavior in the generated native executable.
-
addAllCharsets
@WithDefault("false") boolean addAllCharsets()If all character sets should be added to the native image. This increases image size
-
graalvmHome
@WithDefault("${GRAALVM_HOME:}") Optional<String> graalvmHome()The location of the Graal distribution
-
javaHome
@WithDefault("${java.home}") File javaHome()The location of the JDK
-
nativeImageXmx
Optional<String> nativeImageXmx()
The maximum Java heap to be used during the native image generation
-
debugBuildProcess
@WithDefault("false") boolean debugBuildProcess()If the native image build should wait for a debugger to be attached before running. This is an advanced option and is generally only intended for those familiar with GraalVM internals
-
publishDebugBuildProcessPort
@WithDefault("true") boolean publishDebugBuildProcessPort()If the debug port should be published when building with docker and debug-build-process is true
-
cleanupServer
@Deprecated @WithDefault("false") boolean cleanupServer()
Deprecated.Since GraalVM 20.2.0 the native image server has become an experimental feature and is disabled by default.If the native image server should be restarted.
-
enableIsolates
@WithDefault("true") boolean enableIsolates()If isolates should be enabled
-
enableFallbackImages
@WithDefault("false") boolean enableFallbackImages()If a JVM based 'fallback image' should be created if native image fails. This is not recommended, as this is functionally the same as just running the application in a JVM
-
enableServer
@Deprecated @WithDefault("false") boolean enableServer()
Deprecated.This used to be the default prior to GraalVM 20.2.0 and this configuration item was used to disable it as it was not stable. Since GraalVM 20.2.0 the native image server has become an experimental feature.If the native image server should be used. This can speed up compilation but can result in changes not always being picked up due to cache invalidation not working 100%
-
autoServiceLoaderRegistration
@WithDefault("false") boolean autoServiceLoaderRegistration()If all META-INF/services entries should be automatically registered
-
dumpProxies
@WithDefault("false") boolean dumpProxies()If the bytecode of all proxies should be dumped for inspection
-
containerBuild
Optional<Boolean> containerBuild()
If this build should be done using a container runtime. Unless container-runtime is also set, docker will be used by default. If docker is not available or is an alias to podman, podman will be used instead as the default.
-
remoteContainerBuild
@WithDefault("false") boolean remoteContainerBuild()If this build is done using a remote docker daemon.
-
isExplicitContainerBuild
default boolean isExplicitContainerBuild()
-
builderImage
@WithDefault("${platform.quarkus.native.builder-image}") @ConfigDocDefault("mandrel") String builderImage()The docker image to use to do the image build. It can be one of `graalvm`, `mandrel`, or the full image path, e.g.quay.io/quarkus/ubi-quarkus-mandrel-builder-image:22.3-java17.
-
getEffectiveBuilderImage
default String getEffectiveBuilderImage()
-
containerRuntime
Optional<ContainerRuntimeUtil.ContainerRuntime> containerRuntime()
The container runtime (e.g. docker) that is used to do an image based build. If this is set then a container build is always done.
-
containerRuntimeOptions
Optional<List<String>> containerRuntimeOptions()
Options to pass to the container runtime
-
enableVmInspection
@WithDefault("false") @Deprecated boolean enableVmInspection()Deprecated.Usequarkus.native.monitoringinstead.If the resulting image should allow VM introspection.
-
monitoring
Optional<List<NativeConfig.MonitoringOption>> monitoring()
Enable monitoring various monitoring options. The value should be comma separated.jfrfor JDK flight recorder supportjvmstatfor JVMStat supportheapdumpfor heampdump supportjmxclientfor JMX client support (experimental)jmxserverfor JMX server support (experimental)allfor all monitoring features
-
fullStackTraces
@WithDefault("true") boolean fullStackTraces()If full stack traces are enabled in the resulting image
-
enableReports
@WithDefault("false") boolean enableReports()If the reports on call paths and included packages/classes/methods should be generated
-
reportExceptionStackTraces
@WithDefault("true") boolean reportExceptionStackTraces()If exceptions should be reported with a full stack trace
-
reportErrorsAtRuntime
@WithDefault("false") boolean reportErrorsAtRuntime()If errors should be reported at runtime. This is a more relaxed setting, however it is not recommended as it means your application may fail at runtime if an unsupported feature is used by accident.
-
reuseExisting
@WithDefault("false") boolean reuseExisting()Don't build a native image if it already exists. This is useful if you have already built an image and you want to use Quarkus to deploy it somewhere. Note that this is not able to detect if the existing image is outdated, if you have modified source or config and want a new image you must not use this flag.
-
resources
NativeConfig.ResourcesConfig resources()
Build time configuration options for resources inclusion in the native executable.
-
debug
NativeConfig.Debug debug()
Debugging options.
-
enableDashboardDump
@WithDefault("false") boolean enableDashboardDump()Generate the report files for GraalVM Dashboard.
-
compression
NativeConfig.Compression compression()
Configure native executable compression using UPX.
-
-