Class PackageConfig
- java.lang.Object
-
- io.quarkus.deployment.pkg.PackageConfig
-
@ConfigRoot public class PackageConfig extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
PackageConfig.FernflowerConfig
-
Field Summary
Fields Modifier and Type Field Description Optional<String>
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.boolean
appcdsUseContainer
Whether creation of the AppCDS archive should run in a container if available.boolean
createAppcds
Whether to automate the creation of AppCDS.static String
FAST_JAR
PackageConfig.FernflowerConfig
fernflower
Fernflower Decompiler configurationboolean
filterOptionalDependencies
Flag indicating whether the optional dependencies should be filtered out or not.boolean
includeDependencyList
This option only applies when using fast-jar or mutable-jar.Optional<Set<String>>
includedOptionalDependencies
List of all the dependencies that have been defined as optional to include into the final package of the application.static String
JAR
static String
LEGACY
Deprecated.use 'legacy-jar' insteadstatic String
LEGACY_JAR
Optional<String>
mainClass
The entry point of the application.ManifestConfig
manifest
Manifest configuration of the runner jar.static String
MUTABLE_JAR
static String
NATIVE
static String
NATIVE_SOURCES
Optional<String>
outputDirectory
The output folder in which to place the output, this is resolved relative to the build systems target directory.Optional<String>
outputName
The name of the final artifactString
runnerSuffix
The suffix that is applied to the runner jar and native imagesString
type
The requested output type.static String
UBER_JAR
Optional<List<String>>
userConfiguredIgnoredEntries
Files that should not be copied to the output artifactOptional<String>
userProvidersDirectory
This is an advanced option that only takes effect for the mutable-jar format.boolean
writeTransformedBytecodeToBuildOutput
If set totrue
, it will result in the Quarkus writing the transformed application bytecode to the build tool's output directory.
-
Constructor Summary
Constructors Constructor Description PackageConfig()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
isAnyJarType()
boolean
isFastJar()
boolean
isLegacyJar()
boolean
isUberJar()
-
-
-
Field Detail
-
JAR
public static final String JAR
- See Also:
- Constant Field Values
-
UBER_JAR
public static final String UBER_JAR
- See Also:
- Constant Field Values
-
FAST_JAR
public static final String FAST_JAR
- See Also:
- Constant Field Values
-
MUTABLE_JAR
public static final String MUTABLE_JAR
- See Also:
- Constant Field Values
-
LEGACY
@Deprecated public static final String LEGACY
Deprecated.use 'legacy-jar' instead- See Also:
- Constant Field Values
-
LEGACY_JAR
public static final String LEGACY_JAR
- See Also:
- Constant Field Values
-
NATIVE
public static final String NATIVE
- See Also:
- Constant Field Values
-
NATIVE_SOURCES
public static final String NATIVE_SOURCES
- See Also:
- Constant Field Values
-
type
@ConfigItem(defaultValue="jar") public String 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', 'native' and 'native-sources'.
-
manifest
@ConfigItem public ManifestConfig manifest
Manifest configuration of the runner jar.
-
mainClass
@ConfigItem public Optional<String> mainClass
The entry point of the application. This can either be a 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
@ConfigItem public Optional<List<String>> userConfiguredIgnoredEntries
Files that should not be copied to the output artifact
-
includedOptionalDependencies
@ConfigItem public Optional<Set<String>> 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
@ConfigItem(defaultValue="false") public boolean 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
@ConfigItem(defaultValue="-runner") public String runnerSuffix
The suffix that is applied to the runner jar and native images
-
outputDirectory
@ConfigItem public Optional<String> outputDirectory
The output folder in which to place the output, this is resolved relative to the build systems target directory.
-
outputName
@ConfigItem public Optional<String> outputName
The name of the final artifact
-
createAppcds
@ConfigItem public boolean createAppcds
Whether to automate the creation of AppCDS. This has not 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
@ConfigItem public Optional<String> 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 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
@ConfigItem(defaultValue="true") public boolean 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
@ConfigItem public Optional<String> 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
@ConfigItem(defaultValue="true") public boolean 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.
-
fernflower
@ConfigItem public PackageConfig.FernflowerConfig fernflower
Fernflower Decompiler configuration
-
writeTransformedBytecodeToBuildOutput
@ConfigItem public boolean 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).
-
-