- All Superinterfaces:
Task<Image,
BuildRuntimeTask>
A task for building a custom Java runtime image for the project.
The resulting Java runtime image is an optimized assembly of the project resources (module and dependency modules) and required JDK's modules. The PackageApplicationTask
requires a runtime
image to create an optimized application package.
This task depends on BuildJmodTask
.
- Since:
- 1.4
- Author:
- Jeremy Kuhn
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic interface
Parameters describing a runtime image launcher. -
Method Summary
Modifier and TypeMethodDescriptionaddModules
(String addModules) Specifies the modules to add to the runtime image.addOptions
(String addOptions) Specifies the options to prepend before any other options when invoking the JVM of the runtime image.addUnnamedModules
(boolean addUnnamedModules) Specifies whether unnamed modules should be added to the runtime image.archive()
Creates an archive task.default ArchiveTask
archive
(Consumer<ArchiveTask> configurer) Creates and configures an archive task.bindServices
(boolean bindServices) Specifies whether to link in service provider modules must and their dependencies.Specifies the compress level of the runtime image: 0=No compression, 1=constant string sharing, 2=ZIP.ignoreSigningInformation
(boolean ignoreSigningInformation) Specifies whether to suppress a fatal error when signed modular JARs are linked in the runtime image.launchers
(List<? extends BuildRuntimeTask.Launcher> launchers) Specifies a list of launchers to generate in the runtime image.Creates a package application task.default PackageApplicationTask
packageApplication
(Consumer<PackageApplicationTask> configurer) Creates and configures a package application task.stripDebug
(boolean stripDebug) Specifies whether to strip debug information from the runtime image.stripNativeCommands
(boolean stripNativeCommands) Specifies whether to strip native command (eg. java...) from the runtime image.Specifies the HotSpot VM in the runtime image defined as:"client" / "server" / "minimal" / "all"
Methods inherited from interface io.inverno.tool.buildtools.Task
doOnComplete, execute
-
Method Details
-
addModules
Specifies the modules to add to the runtime image.
- Parameters:
addModules
- a comma-separated list of modules- Returns:
- the task
-
addOptions
Specifies the options to prepend before any other options when invoking the JVM of the runtime image.
- Parameters:
addOptions
- the options to pass to the runtime image JVM- Returns:
- the task
-
compress
Specifies the compress level of the runtime image: 0=No compression, 1=constant string sharing, 2=ZIP.
- Parameters:
compress
- the compress level- Returns:
- the task
-
bindServices
Specifies whether to link in service provider modules must and their dependencies.
- Parameters:
bindServices
- true to link in service provide modules and their depenencies, false otherwise- Returns:
- the task
-
ignoreSigningInformation
Specifies whether to suppress a fatal error when signed modular JARs are linked in the runtime image.
- Parameters:
ignoreSigningInformation
- true to suppress fatal error when linking signed modular JARs, false otherwise- Returns:
- the task
-
stripDebug
Specifies whether to strip debug information from the runtime image.
Defaults to
true
.- Parameters:
stripDebug
- true to strip debug information, false otherwise- Returns:
- the task
-
stripNativeCommands
Specifies whether to strip native command (eg. java...) from the runtime image.
Defaults to
true
.- Parameters:
stripNativeCommands
- true to strip native command, false otherwise- Returns:
- the task
-
vm
Specifies the HotSpot VM in the runtime image defined as:
"client" / "server" / "minimal" / "all"
- Parameters:
vm
- the HotSpot VM in the runtime image- Returns:
- the task
-
addUnnamedModules
Specifies whether unnamed modules should be added to the runtime image.
Enabling this option would result in all unnamed dependencies to be added to the runtime image. Please consider using
addModules(java.lang.String)
to only add specific ones. Note that at this stage unnamed dependencies should have been modularized and should be named[GROUP].[NAME]
with[NAME]
being escaped to be a valid Java identifier (i.e."-"
replaced by"."
...).- Parameters:
addUnnamedModules
- true to add all unnamed modules, false otherwise- Returns:
- the task
-
launchers
Specifies a list of launchers to generate in the runtime image.
- Parameters:
launchers
- a list of launchers- Returns:
- the task
-
archive
ArchiveTask archive()Creates an archive task.
- Returns:
- an archive task
-
archive
Creates and configures an archive task.
- Parameters:
configurer
- a configurer- Returns:
- a configured archive task
-
packageApplication
PackageApplicationTask packageApplication()Creates a package application task.
- Returns:
- a package application task
-
packageApplication
Creates and configures a package application task.
- Parameters:
configurer
- a configurer- Returns:
- a configured package application task
-