Interface PackageApplicationTask
- All Superinterfaces:
Task<Set<Image>,
PackageApplicationTask>
A task for packaging modular applications with an optimized Java runtime.
A project application package is a native self-contained Java application including all the necessary dependencies. It can be used to distribute full package of application including executables,
legal notices, configuration, documentation... It can be generated to various OS specific formats (see PackageApplicationTask.PackageType
), the ArchiveTask
can also be chained
after this task to package it to portable archives.
This task requires a runtime and depends on BuildRuntimeTask
.
- Since:
- 1.4
- Author:
- Jeremy Kuhn
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic interface
Parameters describing an application launcher.static interface
Linux specific configuration.static interface
MacOS specific configuration.static enum
The types of package that the task can generate.static interface
Windows specific configuration. -
Method Summary
Modifier and TypeMethodDescriptionSets the application's home page URL.appContents
(Set<Path> appContents) Sets paths to files and/or directories to add to the application package.archive()
Creates an archive task.default ArchiveTask
archive
(Consumer<ArchiveTask> configurer) Creates and configures an archive task.automaticLaunchers
(boolean automaticLaunchers) Sets whether the task should automatically generate launchers based on the main classes extracted from the application module.Creates a containerize task.default ContainerizeTask
containerize
(Consumer<ContainerizeTask> configurer) Creates and configures a containerize task.Sets the copypright for the application.installDirectory
(String installDirectory) Sets the path of the installation directory of the application.launchers
(List<? extends PackageApplicationTask.Launcher> launchers) Sets the launchers to generate in the application package.licensePath
(Path licensePath) Sets the path to the license file.linuxConfiguration
(PackageApplicationTask.LinuxConfiguration linuxConfiguration) Sets Linux specific configuration.macOSConfiguration
(PackageApplicationTask.MacOSConfiguration macOSConfiguration) Sets MacOS specific configuration.resourcesPath
(Path resourcesPath) Sets the path to the resources overriding application package resources.Sets the type of package to generate.Sets the vendor of the application.windowsConfiguration
(PackageApplicationTask.WindowsConfiguration windowsConfiguration) Sets Windows specific configuration.Methods inherited from interface io.inverno.tool.buildtools.Task
doOnComplete, execute
-
Method Details
-
copyright
Sets the copypright for the application.
- Parameters:
copyright
- a copyright- Returns:
- the task
-
vendor
Sets the vendor of the application.
- Parameters:
vendor
- a vendor- Returns:
- the task
-
aboutURL
Sets the application's home page URL.
- Parameters:
aboutURL
- a URI- Returns:
- the task
-
installDirectory
Sets the path of the installation directory of the application.
- Parameters:
installDirectory
- the install directory- Returns:
- the task
-
licensePath
Sets the path to the license file.
- Parameters:
licensePath
- the path to the license file- Returns:
- the task
-
resourcesPath
Sets the path to the resources overriding application package resources.
- Parameters:
resourcesPath
- the path to the overriding resources- Returns:
- the task
-
appContents
Sets paths to files and/or directories to add to the application package.
- Parameters:
appContents
- a set of paths- Returns:
- the task
-
automaticLaunchers
Sets whether the task should automatically generate launchers based on the main classes extracted from the application module.
When enabled, a launcher is generated for each main class other than the main launcher class defined in the project module.
Defaults to
true
.- Parameters:
automaticLaunchers
- true to enable automatic launchers generation, false otherwise- Returns:
- the task
-
launchers
Sets the launchers to generate in the application package.
At least one launcher is required to generate an application package, if none are specified, the main class specified when generating the project JMOD archive is chosen, if none was specified, then first main class found in the module is chosen. If no main class could be resolved the task execution will fail with a
TaskExecutionException
.- Parameters:
launchers
- a list of launchers- Returns:
- the task
-
linuxConfiguration
PackageApplicationTask linuxConfiguration(PackageApplicationTask.LinuxConfiguration linuxConfiguration) Sets Linux specific configuration.
- Parameters:
linuxConfiguration
- a Linux configuration- Returns:
- the task
-
macOSConfiguration
PackageApplicationTask macOSConfiguration(PackageApplicationTask.MacOSConfiguration macOSConfiguration) Sets MacOS specific configuration.
- Parameters:
macOSConfiguration
- a MacOS configuration- Returns:
- the task
-
windowsConfiguration
PackageApplicationTask windowsConfiguration(PackageApplicationTask.WindowsConfiguration windowsConfiguration) Sets Windows specific configuration.
- Parameters:
windowsConfiguration
- a Windows configuration- Returns:
- the task
-
types
Sets the type of package to generate.
- Parameters:
types
- a set of package types- 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
-
containerize
ContainerizeTask containerize()Creates a containerize task.
- Returns:
- a containerize task
-
containerize
Creates and configures a containerize task.
- Parameters:
configurer
- a configurer- Returns:
- a containerize task
-