Class PackageConfig

java.lang.Object
io.quarkus.deployment.pkg.PackageConfig

@ConfigRoot public class PackageConfig extends Object
  • Field Details

    • JAR

      @Deprecated public static final String JAR
      Deprecated.
    • UBER_JAR

      @Deprecated public static final String UBER_JAR
      Deprecated.
    • FAST_JAR

      @Deprecated public static final String FAST_JAR
      Deprecated.
    • MUTABLE_JAR

      @Deprecated public static final String MUTABLE_JAR
      Deprecated.
    • LEGACY

      @Deprecated public static final String LEGACY
      Deprecated.
      use 'legacy-jar' instead
    • LEGACY_JAR

      @Deprecated public static final String LEGACY_JAR
      Deprecated.
    • NATIVE

      @Deprecated public static final String NATIVE
      Deprecated.
    • NATIVE_SOURCES

      @Deprecated public static final String NATIVE_SOURCES
    • 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', 'mutable-jar' (for remote development mode), 'native' and 'native-sources'.

    • compressJar

      @ConfigItem @ConfigDocDefault("false") public Optional<Boolean> compressJar
      Whether the created jar will be compressed. This setting is not used when building a native image
    • 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 fully qualified name of a standard Java class with a main method, or QuarkusApplication.

      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 to true.

      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
    • addRunnerSuffix

      @ConfigItem(defaultValue="true") public boolean 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

      @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 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

      @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 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 when quarkus.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 to false.

    • 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.
    • vineflower

      Deprecated, for removal: This API element is subject to removal in a future version.
      Vineflower Decompiler configuration
    • decompiler

      Decompiler configuration
    • writeTransformedBytecodeToBuildOutput

      @ConfigItem public boolean writeTransformedBytecodeToBuildOutput
      If set to true, 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 in target/classes being updated with the versions that result after Quarkus has applied its transformations. Setting this to true 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

      public String getRunnerSuffix()