jpackage:jpackage

Full name:

org.panteleyev:jpackage-maven-plugin:1.7.1:jpackage

Description:

Generates application package.

Each plugin parameter defines jpackage option. For detailed information about these options please refer to Packaging Tool User's Guide

Attributes:

  • Requires a Maven project to be executed.
  • The goal is not marked as thread-safe and thus does not support parallel builds.

Required Parameters

Name Type Since Description
<destination> File 14

--dest destination

Path where generated output file is placed.

See also removeDestination

<name> String 14

--name name

Name of the application and/or package.


Default: ${project.name}

Optional Parameters

Name Type Since Description
<aboutUrl> String 17

--about-url url

URL of the application's home page.

<addModules> List<String> 14

--add-modules module[,module]

This module list, along with the main module (if specified) will be passed to jlink as the --add-module argument. If not specified, either just the main module (if module is specified), or the default set of modules (if mainJar is specified) are used.

Example:

<addModules>
    <module>module1</module>
    <module>module2</module>
</addModules>

<additionalOptions> List<String> -

Additional jpackage options not covered by dedicated plugin parameters.

Example:

<additionalOptions>
    <option>--jlink-options</option>
    <option>--bind-services</option>
</additionalOptions>

<appContentPaths> List<File> 18

--app-content additional-content[,additional-content...]

A list of paths to files and/or directories to add to the application payload.

Example:

<appContentPaths>
    <path>./docs</path>
    <path>./images</path>
</appContentPaths>

<appImage> File 14

--app-image directory

Location of the predefined application image that is used to build an installable package (on all platforms) or to be signed (on macOS).

<appVersion> String 14

--app-version version

Version of the application and/or package.


Default: ${project.version}
<arguments> List<String> 14

--arguments arguments

Command line arguments to pass to the main class if no command line arguments are given to the launcher.

Example:

<arguments>
    <argument>--help</argument>
</arguments>

<copyright> String 14

--copyright copyright

Copyright for the application.

<description> String 14

--description description

Description of the application.

<fileAssociations> List<File> 14

--file-associations path

Path to a Properties file that contains list of key, value pairs.

Each property file is specified by a separate <fileAssociation> parameter.

Example:

<fileAssociations>
    <association>src/properties/java.properties</association>
    <association>src/properties/cpp.properties</association>
</fileAssociations>

<icon> File 14

--icon path

Path of the icon of the application package.

<input> File 14

--input directory

Path of the input directory that contains the files to be packaged. All files in the input directory will be packaged into the application image.

<installDir> String 14

--install-dir path

Absolute path of the installation directory of the application (on macOS or linux), or relative sub-path of the installation directory such as "Program Files" or "AppData" (on Windows).

<jLinkOptions> List<String> 16

--jlink-options options

A list of options to pass to jlink

If not specified, defaults to "--strip-native-commands --strip-debug --no-man-pages --no-header-files".

Example:

<jLinkOptions>
    <option>--strip-native-commands</option>
    <option>--strip-debug</option>
</jLinkOptions>

<javaOptions> List<String> 14

--java-options options

Options to pass to the Java runtime.

Example:

<javaOptions>
    <option>-XX:NewRatio=1</option>
    <option>-Xms100m</option>
    <option>-Xmx100m</option>
</javaOptions>

<launcherAsService> boolean 19

--launcher-as-service

Request to create an installer that will register the main application launcher as a background service-type application.

<launchers> List<Launcher> 14

--add-launcher name=path

Name of launcher, and a path to a Properties file that contains a list of key, value pairs.

Example:

<launchers>
    <launcher>
        <name>name-of-the-launcher</name>
        <file>/path/to/launcher.properties</file>
    </launcher>
</launchers>

<licenseFile> File 14

--license-file path

Path to the license file.

<linuxAppCategory> String 14

--linux-app-category category-value

Group value of the RPM <name>.spec file or Section value of DEB control file.

<linuxAppRelease> String 14

--linux-app-release release

Release value of the RPM <name>.spec file or Debian revision value of the DEB control file.

<linuxDebMaintainer> String 14

--linux-deb-maintainer email-address

Maintainer for .deb bundle.

<linuxMenuGroup> String 14

--linux-menu-group menu-group-name

Menu group this application is placed in.

<linuxPackageDeps> String 14

--linux-package-deps package-dep-string

Required packages or capabilities for the application.

<linuxPackageName> String 14

--linux-package-name name

Name for Linux package.

<linuxRpmLicenseType> String 14

--linux-rpm-license-type type

Type of the license ("License: value" of the RPM .spec)

<linuxShortcut> boolean 14

--linux-shortcut

Creates a shortcut for the application.

<macAppCategory> String 17

--mac-app-category category

String used to construct LSApplicationCategoryType in application plist.

The default value is "utilities".

<macAppStore> boolean 17

--mac-app-store

Indicates that the jpackage output is intended for the Mac App Store.

<macDmgContentPaths> List<File> 18

--mac-dmg-content additional-content[,additional-content...]

Include all the referenced content in the dmg.

Example:

<macDmgContentPaths>
    <path>./docs</path>
    <path>./images</path>
</macDmgContentPaths>

<macEntitlements> File 17

--mac-entitlements path

Path to file containing entitlements to use when signing executables and libraries in the bundle.

<macPackageIdentifier> String 14

--mac-package-identifier identifier

An identifier that uniquely identifies the application for macOS.

Defaults to the main class name.

May only use alphanumeric (A-Z,a-z,0-9), hyphen (-), and period (.) characters.

<macPackageName> String 14

--mac-package-name name

Name of the application as it appears in the Menu Bar.

This can be different from the application name.

This name must be less than 16 characters long and be suitable for displaying in the menu bar and the application Info window. Defaults to the application name.

<macPackageSigningPrefix> String 17

--mac-package-signing-prefix prefix

When signing the application package, this value is prefixed to all components that need to be signed that don't have an existing package identifier.

<macSign> boolean 14

--mac-sign

Request that the package or the predefined application image be signed.

<macSigningKeyUserName> String 14

--mac-signing-key-user-name name

Team or user name portion in Apple signing identities.

<macSigningKeychain> File 14

--mac-signing-keychain keychain-name

Name of the keychain to search for the signing identity.

If not specified, the standard keychains are used.

<mainClass> String 14

--main-class class-name

Qualified name of the application main class to execute.

<mainJar> String 14

--main-jar main-jar

The main JAR of the application; containing the main class (specified as a path relative to the input path).

<module> String 14

--module module-name[/main-class]

The main module (and optionally main class) of the application.

This module must be located on the module path.

When this option is specified, the main module will be linked in the Java runtime image. Either module or mainJar option can be specified but not both.

<modulePaths> List<File> 14

--module-path module-path [,module-path...]

Each path is either a directory of modules or the path to a modular jar.

Example:

<modulePaths>
    <path>${project.build.directory}/mods</path>
</modulePaths>

<removeDestination> boolean -

Remove destination directory.

Request to remove destination directory before executing jpackage.

jpackage utility fails if generated binary already exists. This option allows to overcome this behaviour. If true plugin will try to delete directory specified by destination. This might be useful to relaunch jpackage task without rebuilding an entire project.

For safety reasons plugin will not process removeDestination if destination points to a location outside of ${project.build.directory}.

<resourceDir> File 14

--resource-dir path

Path to override jpackage resources. Icons, template files, and other resources of jpackage can be over-ridden by adding replacement resources to this directory.

<runtimeImage> File 14

--runtime-image path

For runtime image: Path of the predefined runtime image that will be copied into the application image.
If runtimeImage is not specified, jpackage will run jlink to create the runtime image using options specified by jLinkOptions.

For application package: Path of the predefined runtime image to install.
Option is required when creating a runtime installer.

<skip> boolean - Skips plugin execution.
Default: false
<temp> File 14

--temp directory

Path of a new or empty directory used to create temporary files.

If specified, the temp dir will not be removed upon the task completion and must be removed manually.

If not specified, a temporary directory will be created and removed upon the task completion.

<type> ImageType 14

--type type

The type of package to create. Possible values:

Plugin JPackage
APP_IMAGE app-image
DMG dmg
PKG pkg
EXE exe
MSI msi
DEB deb
<vendor> String 14

--vendor vendor

Vendor of the application.

<verbose> boolean 14

--verbose

Enables verbose output.

<winConsole> boolean 14

--win-console

Creates a console launcher for the application, should be specified for application which requires console interactions.

<winDirChooser> boolean 14

--win-dir-chooser

Adds a dialog to enable the user to choose a directory in which the product is installed.

<winHelpUrl> String 17

--win-help-url url

URL where user can obtain further information or technical support.

<winMenu> boolean 14

--win-menu

Request to add a Start Menu shortcut for this application.

<winMenuGroup> String 14

--win-menu-group menu group name

Start Menu group this application is placed in.

<winPerUserInstall> boolean 14

--win-per-user-install

Request to perform an installation on a per-user basis.

<winShortcut> boolean 14

--win-shortcut

Request to create a desktop shortcut for this application.

<winShortcutPrompt> boolean 17

--win-shortcut-prompt

Adds a dialog to enable the user to choose if shortcuts will be created by installer.

<winUpdateUrl> String 17

--win-update-url url

URL of available application update information.

<winUpgradeUuid> String 14

--win-upgrade-uuid id

UUID associated with upgrades for this package.

Parameter Details

<aboutUrl>

--about-url url

URL of the application's home page.

  • Type: java.lang.String
  • Since: 17
  • Required: No

<addModules>

--add-modules module[,module]

This module list, along with the main module (if specified) will be passed to jlink as the --add-module argument. If not specified, either just the main module (if module is specified), or the default set of modules (if mainJar is specified) are used.

Example:

<addModules>
    <module>module1</module>
    <module>module2</module>
</addModules>

  • Type: java.util.List<java.lang.String>
  • Since: 14
  • Required: No

<additionalOptions>

Additional jpackage options not covered by dedicated plugin parameters.

Example:

<additionalOptions>
    <option>--jlink-options</option>
    <option>--bind-services</option>
</additionalOptions>

  • Type: java.util.List<java.lang.String>
  • Required: No

<appContentPaths>

--app-content additional-content[,additional-content...]

A list of paths to files and/or directories to add to the application payload.

Example:

<appContentPaths>
    <path>./docs</path>
    <path>./images</path>
</appContentPaths>

  • Type: java.util.List<java.io.File>
  • Since: 18
  • Required: No

<appImage>

--app-image directory

Location of the predefined application image that is used to build an installable package (on all platforms) or to be signed (on macOS).

  • Type: java.io.File
  • Since: 14
  • Required: No

<appVersion>

--app-version version

Version of the application and/or package.

  • Type: java.lang.String
  • Since: 14
  • Required: No
  • Default: ${project.version}

<arguments>

--arguments arguments

Command line arguments to pass to the main class if no command line arguments are given to the launcher.

Example:

<arguments>
    <argument>--help</argument>
</arguments>

  • Type: java.util.List<java.lang.String>
  • Since: 14
  • Required: No

<copyright>

--copyright copyright

Copyright for the application.

  • Type: java.lang.String
  • Since: 14
  • Required: No

<description>

--description description

Description of the application.

  • Type: java.lang.String
  • Since: 14
  • Required: No

<destination>

--dest destination

Path where generated output file is placed.

See also removeDestination

  • Type: java.io.File
  • Since: 14
  • Required: Yes

<fileAssociations>

--file-associations path

Path to a Properties file that contains list of key, value pairs.

Each property file is specified by a separate <fileAssociation> parameter.

Example:

<fileAssociations>
    <association>src/properties/java.properties</association>
    <association>src/properties/cpp.properties</association>
</fileAssociations>

  • Type: java.util.List<java.io.File>
  • Since: 14
  • Required: No

<icon>

--icon path

Path of the icon of the application package.

  • Type: java.io.File
  • Since: 14
  • Required: No

<input>

--input directory

Path of the input directory that contains the files to be packaged. All files in the input directory will be packaged into the application image.

  • Type: java.io.File
  • Since: 14
  • Required: No

<installDir>

--install-dir path

Absolute path of the installation directory of the application (on macOS or linux), or relative sub-path of the installation directory such as "Program Files" or "AppData" (on Windows).

  • Type: java.lang.String
  • Since: 14
  • Required: No

<jLinkOptions>

--jlink-options options

A list of options to pass to jlink

If not specified, defaults to "--strip-native-commands --strip-debug --no-man-pages --no-header-files".

Example:

<jLinkOptions>
    <option>--strip-native-commands</option>
    <option>--strip-debug</option>
</jLinkOptions>

  • Type: java.util.List<java.lang.String>
  • Since: 16
  • Required: No

<javaOptions>

--java-options options

Options to pass to the Java runtime.

Example:

<javaOptions>
    <option>-XX:NewRatio=1</option>
    <option>-Xms100m</option>
    <option>-Xmx100m</option>
</javaOptions>

  • Type: java.util.List<java.lang.String>
  • Since: 14
  • Required: No

<launcherAsService>

--launcher-as-service

Request to create an installer that will register the main application launcher as a background service-type application.

  • Type: boolean
  • Since: 19
  • Required: No

<launchers>

--add-launcher name=path

Name of launcher, and a path to a Properties file that contains a list of key, value pairs.

Example:

<launchers>
    <launcher>
        <name>name-of-the-launcher</name>
        <file>/path/to/launcher.properties</file>
    </launcher>
</launchers>

  • Type: java.util.List<org.panteleyev.jpackage.Launcher>
  • Since: 14
  • Required: No

<licenseFile>

--license-file path

Path to the license file.

  • Type: java.io.File
  • Since: 14
  • Required: No

<linuxAppCategory>

--linux-app-category category-value

Group value of the RPM <name>.spec file or Section value of DEB control file.

  • Type: java.lang.String
  • Since: 14
  • Required: No

<linuxAppRelease>

--linux-app-release release

Release value of the RPM <name>.spec file or Debian revision value of the DEB control file.

  • Type: java.lang.String
  • Since: 14
  • Required: No

<linuxDebMaintainer>

--linux-deb-maintainer email-address

Maintainer for .deb bundle.

  • Type: java.lang.String
  • Since: 14
  • Required: No

<linuxMenuGroup>

--linux-menu-group menu-group-name

Menu group this application is placed in.

  • Type: java.lang.String
  • Since: 14
  • Required: No

<linuxPackageDeps>

--linux-package-deps package-dep-string

Required packages or capabilities for the application.

  • Type: java.lang.String
  • Since: 14
  • Required: No

<linuxPackageName>

--linux-package-name name

Name for Linux package.

  • Type: java.lang.String
  • Since: 14
  • Required: No

<linuxRpmLicenseType>

--linux-rpm-license-type type

Type of the license ("License: value" of the RPM .spec)

  • Type: java.lang.String
  • Since: 14
  • Required: No

<linuxShortcut>

--linux-shortcut

Creates a shortcut for the application.

  • Type: boolean
  • Since: 14
  • Required: No

<macAppCategory>

--mac-app-category category

String used to construct LSApplicationCategoryType in application plist.

The default value is "utilities".

  • Type: java.lang.String
  • Since: 17
  • Required: No

<macAppStore>

--mac-app-store

Indicates that the jpackage output is intended for the Mac App Store.

  • Type: boolean
  • Since: 17
  • Required: No

<macDmgContentPaths>

--mac-dmg-content additional-content[,additional-content...]

Include all the referenced content in the dmg.

Example:

<macDmgContentPaths>
    <path>./docs</path>
    <path>./images</path>
</macDmgContentPaths>

  • Type: java.util.List<java.io.File>
  • Since: 18
  • Required: No

<macEntitlements>

--mac-entitlements path

Path to file containing entitlements to use when signing executables and libraries in the bundle.

  • Type: java.io.File
  • Since: 17
  • Required: No

<macPackageIdentifier>

--mac-package-identifier identifier

An identifier that uniquely identifies the application for macOS.

Defaults to the main class name.

May only use alphanumeric (A-Z,a-z,0-9), hyphen (-), and period (.) characters.

  • Type: java.lang.String
  • Since: 14
  • Required: No

<macPackageName>

--mac-package-name name

Name of the application as it appears in the Menu Bar.

This can be different from the application name.

This name must be less than 16 characters long and be suitable for displaying in the menu bar and the application Info window. Defaults to the application name.

  • Type: java.lang.String
  • Since: 14
  • Required: No

<macPackageSigningPrefix>

--mac-package-signing-prefix prefix

When signing the application package, this value is prefixed to all components that need to be signed that don't have an existing package identifier.

  • Type: java.lang.String
  • Since: 17
  • Required: No

<macSign>

--mac-sign

Request that the package or the predefined application image be signed.

  • Type: boolean
  • Since: 14
  • Required: No

<macSigningKeyUserName>

--mac-signing-key-user-name name

Team or user name portion in Apple signing identities.

  • Type: java.lang.String
  • Since: 14
  • Required: No

<macSigningKeychain>

--mac-signing-keychain keychain-name

Name of the keychain to search for the signing identity.

If not specified, the standard keychains are used.

  • Type: java.io.File
  • Since: 14
  • Required: No

<mainClass>

--main-class class-name

Qualified name of the application main class to execute.

  • Type: java.lang.String
  • Since: 14
  • Required: No

<mainJar>

--main-jar main-jar

The main JAR of the application; containing the main class (specified as a path relative to the input path).

  • Type: java.lang.String
  • Since: 14
  • Required: No

<module>

--module module-name[/main-class]

The main module (and optionally main class) of the application.

This module must be located on the module path.

When this option is specified, the main module will be linked in the Java runtime image. Either module or mainJar option can be specified but not both.

  • Type: java.lang.String
  • Since: 14
  • Required: No

<modulePaths>

--module-path module-path [,module-path...]

Each path is either a directory of modules or the path to a modular jar.

Example:

<modulePaths>
    <path>${project.build.directory}/mods</path>
</modulePaths>

  • Type: java.util.List<java.io.File>
  • Since: 14
  • Required: No

<name>

--name name

Name of the application and/or package.

  • Type: java.lang.String
  • Since: 14
  • Required: Yes
  • Default: ${project.name}

<removeDestination>

Remove destination directory.

Request to remove destination directory before executing jpackage.

jpackage utility fails if generated binary already exists. This option allows to overcome this behaviour. If true plugin will try to delete directory specified by destination. This might be useful to relaunch jpackage task without rebuilding an entire project.

For safety reasons plugin will not process removeDestination if destination points to a location outside of ${project.build.directory}.

  • Type: boolean
  • Required: No

<resourceDir>

--resource-dir path

Path to override jpackage resources. Icons, template files, and other resources of jpackage can be over-ridden by adding replacement resources to this directory.

  • Type: java.io.File
  • Since: 14
  • Required: No

<runtimeImage>

--runtime-image path

For runtime image: Path of the predefined runtime image that will be copied into the application image.
If runtimeImage is not specified, jpackage will run jlink to create the runtime image using options specified by jLinkOptions.

For application package: Path of the predefined runtime image to install.
Option is required when creating a runtime installer.

  • Type: java.io.File
  • Since: 14
  • Required: No

<skip>

Skips plugin execution.
  • Type: boolean
  • Required: No
  • Default: false

<temp>

--temp directory

Path of a new or empty directory used to create temporary files.

If specified, the temp dir will not be removed upon the task completion and must be removed manually.

If not specified, a temporary directory will be created and removed upon the task completion.

  • Type: java.io.File
  • Since: 14
  • Required: No

<type>

--type type

The type of package to create. Possible values:

Plugin JPackage
APP_IMAGE app-image
DMG dmg
PKG pkg
EXE exe
MSI msi
DEB deb
  • Type: org.panteleyev.jpackage.ImageType
  • Since: 14
  • Required: No

<vendor>

--vendor vendor

Vendor of the application.

  • Type: java.lang.String
  • Since: 14
  • Required: No

<verbose>

--verbose

Enables verbose output.

  • Type: boolean
  • Since: 14
  • Required: No

<winConsole>

--win-console

Creates a console launcher for the application, should be specified for application which requires console interactions.

  • Type: boolean
  • Since: 14
  • Required: No

<winDirChooser>

--win-dir-chooser

Adds a dialog to enable the user to choose a directory in which the product is installed.

  • Type: boolean
  • Since: 14
  • Required: No

<winHelpUrl>

--win-help-url url

URL where user can obtain further information or technical support.

  • Type: java.lang.String
  • Since: 17
  • Required: No

<winMenu>

--win-menu

Request to add a Start Menu shortcut for this application.

  • Type: boolean
  • Since: 14
  • Required: No

<winMenuGroup>

--win-menu-group menu group name

Start Menu group this application is placed in.

  • Type: java.lang.String
  • Since: 14
  • Required: No

<winPerUserInstall>

--win-per-user-install

Request to perform an installation on a per-user basis.

  • Type: boolean
  • Since: 14
  • Required: No

<winShortcut>

--win-shortcut

Request to create a desktop shortcut for this application.

  • Type: boolean
  • Since: 14
  • Required: No

<winShortcutPrompt>

--win-shortcut-prompt

Adds a dialog to enable the user to choose if shortcuts will be created by installer.

  • Type: boolean
  • Since: 17
  • Required: No

<winUpdateUrl>

--win-update-url url

URL of available application update information.

  • Type: java.lang.String
  • Since: 17
  • Required: No

<winUpgradeUuid>

--win-upgrade-uuid id

UUID associated with upgrades for this package.

  • Type: java.lang.String
  • Since: 14
  • Required: No