Interface PackageApplicationTask

All Superinterfaces:
Task<Set<Image>,PackageApplicationTask>

public interface PackageApplicationTask extends 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
  • Method Details

    • copyright

      PackageApplicationTask copyright(String 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

      PackageApplicationTask aboutURL(URI aboutURL)

      Sets the application's home page URL.

      Parameters:
      aboutURL - a URI
      Returns:
      the task
    • installDirectory

      PackageApplicationTask installDirectory(String installDirectory)

      Sets the path of the installation directory of the application.

      Parameters:
      installDirectory - the install directory
      Returns:
      the task
    • licensePath

      PackageApplicationTask licensePath(Path licensePath)

      Sets the path to the license file.

      Parameters:
      licensePath - the path to the license file
      Returns:
      the task
    • resourcesPath

      PackageApplicationTask resourcesPath(Path resourcesPath)

      Sets the path to the resources overriding application package resources.

      Parameters:
      resourcesPath - the path to the overriding resources
      Returns:
      the task
    • appContents

      PackageApplicationTask appContents(Set<Path> appContents)

      Sets paths to files and/or directories to add to the application package.

      Parameters:
      appContents - a set of paths
      Returns:
      the task
    • automaticLaunchers

      PackageApplicationTask automaticLaunchers(boolean 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

      default ArchiveTask archive(Consumer<ArchiveTask> configurer)

      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

      default ContainerizeTask containerize(Consumer<ContainerizeTask> configurer)

      Creates and configures a containerize task.

      Parameters:
      configurer - a configurer
      Returns:
      a containerize task