Class PackageConfig
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
static class
-
Field Summary
Modifier and TypeFieldDescriptionboolean
Indicates whether the generated binary file (uber-jar or native image) should have the runner suffix appended.When AppCDS generation is enabled, if this property is set, then the JVM used to generate the AppCDS file will be the JVM present in the container image.boolean
Whether creation of the AppCDS archive should run in a container if available.Whether the created jar will be compressed.boolean
Whether to automate the creation of AppCDS.Decompiler configurationstatic final String
Deprecated.boolean
Flag indicating whether the optional dependencies should be filtered out or not.boolean
This option only applies when using fast-jar or mutable-jar.List of all the dependencies that have been defined as optional to include into the final package of the application.static final String
Deprecated.UsePackageConfig.BuiltInType.JAR
insteadstatic final String
Deprecated.use 'legacy-jar' insteadstatic final String
Deprecated.UsePackageConfig.BuiltInType.LEGACY_JAR
insteadThe entry point of the application.Manifest configuration of the runner jar.static final String
Deprecated.UsePackageConfig.BuiltInType.MUTABLE_JAR
insteadstatic final String
Deprecated.UsePackageConfig.BuiltInType.NATIVE
insteadstatic final String
Deprecated.UsePackageConfig.BuiltInType.NATIVE_SOURCES
insteadThe output folder in which to place the output, this is resolved relative to the build systems target directory.The name of the final artifactThe suffix that is applied to the runner jar and native imagesThe requested output type.static final String
Deprecated.UsePackageConfig.BuiltInType.UBER_JAR
insteadFiles that should not be copied to the output artifactThis is an advanced option that only takes effect for the mutable-jar format.Deprecated, for removal: This API element is subject to removal in a future version.boolean
If set totrue
, it will result in the Quarkus writing the transformed application bytecode to the build tool's output directory. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
boolean
boolean
boolean
boolean
-
Field Details
-
JAR
Deprecated.UsePackageConfig.BuiltInType.JAR
instead -
UBER_JAR
Deprecated.UsePackageConfig.BuiltInType.UBER_JAR
instead -
FAST_JAR
Deprecated.UsePackageConfig.BuiltInType.FAST_JAR
instead -
MUTABLE_JAR
Deprecated.UsePackageConfig.BuiltInType.MUTABLE_JAR
instead -
LEGACY
Deprecated.use 'legacy-jar' instead -
LEGACY_JAR
Deprecated.UsePackageConfig.BuiltInType.LEGACY_JAR
instead -
NATIVE
Deprecated.UsePackageConfig.BuiltInType.NATIVE
instead -
NATIVE_SOURCES
Deprecated.UsePackageConfig.BuiltInType.NATIVE_SOURCES
instead -
type
The requested output type.The default built in types are 'jar' (which will use 'fast-jar'), 'legacy-jar' for the pre-1.12 default jar packaging, 'uber-jar', 'mutable-jar' (for remote development mode), 'native' and 'native-sources'.
-
compressJar
Whether the created jar will be compressed. This setting is not used when building a native image -
manifest
Manifest configuration of the runner jar. -
mainClass
The entry point of the application. This can either be a fully qualified name of a standard Java class with a main method, orQuarkusApplication
.If your application has main classes annotated with
QuarkusMain
then this can also reference the name given in the annotation, to avoid the need to specify fully qualified names in the config. -
userConfiguredIgnoredEntries
Files that should not be copied to the output artifact -
includedOptionalDependencies
List of all the dependencies that have been defined as optional to include into the final package of the application. Each optional dependency needs to be expressed in the following format:groupId:artifactId:classifier:type
With the classifier and type being optional.
If the type is missing, the artifact is assumed to be of type
jar
.This parameter is optional, if absent, no optional dependencies will be included into the final package of the application.
For backward compatibility reasons, this parameter is ignored by default and can be enabled by setting the parameter
quarkus.package.filter-optional-dependencies
totrue
.This parameter is meant to be used in modules where multi-builds have been configured to avoid getting a final package with unused dependencies.
-
filterOptionalDependencies
Flag indicating whether the optional dependencies should be filtered out or not.This parameter is meant to be used in modules where multi-builds have been configured to avoid getting a final package with unused dependencies.
-
runnerSuffix
The suffix that is applied to the runner jar and native images -
addRunnerSuffix
Indicates whether the generated binary file (uber-jar or native image) should have the runner suffix appended. Turning off the runner suffix in case of the uber-jar package type, the original build system (Maven, Gradle, etc) built JAR will be replaced with the Quarkus built uber JAR. -
outputDirectory
The output folder in which to place the output, this is resolved relative to the build systems target directory. -
outputName
The name of the final artifact -
createAppcds
Whether to automate the creation of AppCDS. This has no effect when a native binary is needed and will be ignored in that case. Furthermore, this option only works for Java 11+ and is considered experimental for the time being. Finally, care must be taken to use the same exact JVM version when building and running the application. -
appcdsBuilderImage
When AppCDS generation is enabled, if this property is set, then the JVM used to generate the AppCDS file will be the JVM present in the container image. The builder image is expected to have the 'java' binary on its PATH. This flag is useful when the JVM to be used at runtime is not the same exact JVM version as the one used to build the jar. Note that this property is consulted only whenquarkus.package.create-appcds=true
and it requires having docker available during the build. -
appcdsUseContainer
Whether creation of the AppCDS archive should run in a container if available.Normally, if either a suitable container image to create the AppCDS archive inside of can be determined automatically or if one is explicitly set using the
quarkus.package.appcds-builder-image
setting, the AppCDS archive is generated by running the JDK contained in the image as a container.If this option is set to
false
, a container will not be used to generate the AppCDS archive. Instead, the JDK used to build the application is also used to create the archive. Note that the exact same JDK version must be used to run the application in this case.Ignored if
quarkus.package.create-appcds
is set tofalse
. -
userProvidersDirectory
This is an advanced option that only takes effect for the mutable-jar format.If this is specified a directory of this name will be created in the jar distribution. Users can place jar files in this directory, and when re-augmentation is performed these will be processed and added to the class-path.
Note that before reaugmentation has been performed these jars will be ignored, and if they are updated the app should be reaugmented again.
-
includeDependencyList
This option only applies when using fast-jar or mutable-jar. If this option is true then a list of all the coordinates of the artifacts that made up this image will be included in the quarkus-app directory. This list can be used by vulnerability scanners to determine if your application has any vulnerable dependencies. -
vineflower
Deprecated, for removal: This API element is subject to removal in a future version.Vineflower Decompiler configuration -
decompiler
Decompiler configuration -
writeTransformedBytecodeToBuildOutput
If set totrue
, it will result in the Quarkus writing the transformed application bytecode to the build tool's output directory. This is useful for post-build tools that need to scan the application bytecode - for example for offline code-coverage tools. For example, if using Maven, enabling this feature will result in the classes intarget/classes
being updated with the versions that result after Quarkus has applied its transformations. Setting this totrue
however, should be done with a lot of caution and only if subsequent builds are done in a clean environment (i.e. the build tool's output directory has been completely cleaned).
-
-
Constructor Details
-
PackageConfig
public PackageConfig()
-
-
Method Details
-
isAnyJarType
public boolean isAnyJarType() -
isFastJar
public boolean isFastJar() -
isLegacyJar
public boolean isLegacyJar() -
isUberJar
public boolean isUberJar() -
isNativeOrNativeSources
public boolean isNativeOrNativeSources() -
getRunnerSuffix
-
PackageConfig.BuiltInType.FAST_JAR
instead