Jpackage

Creates platform installers with the jpackage tool.

You need JDK 16 or greater to use jpackage. You may configure the JDKs Maven Plugin or the JDKs Gradle Plugin to downloads JDKs.
You may either set the jlink property or the runtimeImages property but not both.

Legend:

  • required

  • optional

  • may use environment variable

  • accepts Name Templates

  • YAML

  • TOML

  • JSON

  • Maven

  • Gradle

# 
assemble:
  # 
  jpackage:
    # Assemblers require a name.
    # 
    app:

      # Enables or disables the assembler.
      # Valid values are [`NEVER`, `ALWAYS`, `RELEASE`, `SNAPSHOT`].
      # Defaults to `NEVER`.
      # 
      active: ALWAYS

      # Export the assembled artifacts as a matching named distribution.
      # Defaults to `true`.
      # 
      exported: true

      # Additional properties used when evaluating templates.
      #  
      extraProperties:
        # Key will be capitalized and prefixed with `jpackage`, i.e, `jpackageFoo`.
        foo: bar

      platform:
        # Key value pairs.
        # Keys match a full platform or an os.name, os.arch.
        # Same rules apply as in Platform.
        # 
        replacements:
          osx-x86_64: mac
          aarch_64: aarch64
          x86_64: amd64
          linux_musl: alpine

      # Name of the jlink assembler to be reused.
      # 
      jlink: app-jlink

      # Attach the current platform to generated installers.
      # Defaults to `false`.
      # 
      attachPlatform: true

      # Enables verbose output.
      # Defaults to `false`.
      # 
      verbose: true

      # Directory with file templates used to prepare the Jpackage assembler.
      # Defaults to `src/jreleaser/assemblers/${distribution.name}/jpackage`.
      # If specified, path must exist.
      # 
      templateDirectory: path/to/jpackage/templates

      # Path to a runtime image created with jlink.
      # Must define a value for `platform`.
      #  
      runtimeImages:
        - path: path/to/runtime-image-osx
          platform: osx-x86_64
        - path: path/to/runtime-image-linux
          platform: linux-x86_64
        - path: path/to/runtime-image-windows
          platform: windows-x86_64

      # 
      applicationPackage:

        # Name of the application and/or package.
        # If left undefined, will use `${assembler.name}`.
        #  
        appName: App

        # Version of the application and/or package.
        # If left undefined, will use `${project.version}`.
        #  
        appVersion: 1.0

        # Vendor of the application.
        # If left undefined, will use `${project.vendor}`.
        # 
        vendor: Acme

        # Copyright for the application.
        # If left undefined, will use `${project.copyright}`.
        # 
        copyright: Duke 2021

        # Path to the license file.
        #  
        licenseFile: path/to/LICENSE

      # 
      launcher:

        # Command line arguments to pass to the main class if no command
        # line arguments are given to the launcher.
        # 
        arguments: [--version]

        # Options to pass to the Java runtime
        # 
        javaOptions: [-Xmx2048m]

        # Name of launcher, and a path to a Properties file that contains
        # a list of key, value pairs.
        # The keys "module", "main-jar", "main-class",
        # "arguments", "java-options", "app-version", "icon", and
        # "win-console" can be used.
        # These options are added to, or used to overwrite, the original
        # command line options to build an additional alternative launcher.
        # The main application launcher will be built from the command line
        # options. Additional alternative launchers can be built using
        # this option, and this option can be used multiple times to
        # build multiple additional launchers.
        # 
        launchers: [alt=path/to/alt.properties]

      # 
      linux:

        # Name of the application and/or package.
        # If left undefined, will use `${applicationPackage.name}`.
        #  
        appName: App

        # Path to the application's icon.
        # Must be in PNG format.
        # Will use default icon if undefined.
        #  
        icon: path/to/app.png

        # Absolute path of the installation directory of the application.
        #  
        installDir: /usr/local/share/app

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

        # The type of package to create.
        # Valid values are [`rpm`, `deb`].
        # 
        types: [rpm, deb]

        # The JDK to use.
        # If undefined, will use the current JDK.
        #  
        jdk:
          path: path/to/jdk

        # Name for Linux package.
        # If undefined, will use the assembler's name.
        # 
        packageName: app

        # Maintainer for .deb package.
        # 
        maintainer: duke

        # Menu group this application is placed in.
        # 
        menuGroup: apps

        # Type of the license ("License: " of the RPM .spec).
        # If undefined, will use `${project.license}`
        # 
        license: MIT

        # Release value of the RPM .spec file or
        # Debian revision value of the DEB control file.
        # 
        appRelease: 1

        # Group value of the RPM .spec file or
        # Section value of DEB control file.
        # 
        appCategory: devel

        # Creates a shortcut for the application
        # 
        shortcut: true

        # Required packages or capabilities for the application
        # 
        packageDeps: [foobar]

      # 
      osx:

        # Name of the application and/or package.
        # If left undefined, will use `${applicationPackage.name}`.
        #  
        appName: App

        # Path to the application's icon.
        # Must be in ICNS format.
        # Will use default icon if undefined.
        #  
        icon: path/to/app.icns

        # Absolute path of the installation directory of the application.
        #  
        installDir: /Applications/app

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

        # The type of package to create.
        # Valid values are [`dmg`, `pkh`].
        # 
        types: [dmg, pkg]

        # The JDK to use.
        # If undefined, will use the current JDK.
        #  
        jdk:
          path: path/to/jdk

        # 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.
        # If undefined, will use the assembler's name.
        # 
        packageName: app

        # 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.
        # 
        packageIdentifier: com.acme.app

        # 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.
        # 
        packageSigningPrefix: com.acme

        # Path of the keychain to search for the signing identity.
        # If not specified, the standard keychains are used.
        #  
        signingKeychain: path/to/keychain

        # Team name portion in Apple signing identities' names.
        # 
        signingKeyUsername: duke

        # Request that the package be signed
        # Defaults to `false`.
        # 
        sign: true

      # 
      windows:

        # Name of the application and/or package.
        # If left undefined, will use `${applicationPackage.name}`.
        #  
        appName: App

        # Path to the application's icon.
        # Must be in ICO format.
        # Will use default icon if undefined.
        #  
        icon: path/to/app.ico

        # Absolute path of the installation directory of the application.
        #  
        installDir: 'C:\\\\Applications\\App'

        # Path to override jpackage resources.
        # Icons, template files, and other resources of jpackage can be
        # over-ridden by adding replacement resources to this directory.
        #  
        resourceDir: 'C:\\\\path\\to\\resources'

        # The type of package to create.
        # Valid values are [`exe`, `msi`].
        # 
        types: [exe, msi]

        # The JDK to use.
        # If undefined, will use the current JDK.
        #  
        jdk:
          path: path/to/jdk

        # Creates a console launcher for the application, should be
        # specified for application which requires console interactions.
        # Defaults to `false`.
        # 
        console: true

        # Adds a dialog to enable the user to choose a directory in which
        # the product is installed.
        # Defaults to `false`.
        # 
        dirChooser: true

        # Adds the application to the system menu.
        # Defaults to `false`.
        # 
        menu: true

        # Request to perform an install on a per-user basis.
        # Defaults to `false`.
        # 
        perUserInstall: true

        # Creates a desktop shortcut for the application.
        # Defaults to `false`.
        # 
        shortcut: true

        # Start Menu group this application is placed in.
        # 
        menuGroup: Applications

        # UUID associated with upgrades for this package.
        # 
        upgradeUuid: ba209999-0c6c-11d2-97cf-00c04f8eea45

      # The executable JAR that contains the application.
      #  
      mainJar:
        path: path/to/app.jar

      # Defines a list of additional JARs as globs.
      # 
      jars:
          # The pattern to use.
          # May use glob or regex pattern syntax.
          #  
        - pattern: path/to/**/*.jar

      # 
      java:
        # Maven coordinates: groupId.
        # If left undefined, will use ${project.java.groupId}.
        # 
        groupId: com.acme

        # Maven coordinates: artifactId.
        # If left undefined, will use ${project.java.artifactId}.
        # 
        artifactId: app

        # The minimum Java version required by consumers to run the application.
        # If left undefined, will use ${project.java.version}.
        # 
        version: 8

        # Name of main module (if any).
        # Define only if the application is modular.
        # 
        mainModule: com.acme.demo

        # The application's entry point.
        # If left undefined, will use ${project.java.mainClass}.
        # 
        mainClass: com.acme.Main

        # Identifies the project as being member of a multi-project build.
        # If left undefined, will use ${project.java.multiProject}.
        # 
        multiProject: false

        # Additional properties used when evaluating templates.
        # 
        extraProperties:
          # Key will be capitalized and prefixed with `java`, i.e, `javaFoo`.
          foo: bar

      # Defines a list of additional files as globs.
      # These files will be added to the assembled Zip file.
      # 
      files:
          # The pattern to use.
          # May use glob or regex pattern syntax.
          #  
        - pattern: path/to/**/*.txt

      # Defines a list of additional files as filesets.
      # These files will be added to the assembled Zip file.
      # 
      fileSets:
          # The input directory to copy files from.
          #  
        - input: path/to/input/directory

          # The target path inside the archive.
          # If left undefined, defaults to the root of the archive.
          #  
          output: path/to/archive/entry

          # Fail if the given `input` does not exist.
          # Defaults to `true`.
          # 
          failOnMissingInput: false

          # A set of files and directory to include.
          #  
          includes:
            - 'name_or_regex'

          # A set of files and directory to exclude.
          #  
          excludes:
            - 'name_or_regex'

          # Additional properties used when evaluating templates.
          #  
          extraProperties:
            # Key will be capitalized and prefixed with `artifact`, i.e, `artifactFoo`.
            foo: bar
# Assemblers require a name.
# 
[assemble.jpackage.app]

  # Enables or disables the assembler.
  # Valid values are [`NEVER`, `ALWAYS`, `RELEASE`, `SNAPSHOT`].
  # Defaults to `NEVER`.
  # 
  active = "ALWAYS"

  # Export the assembled artifacts as a matching named distribution.
  # Defaults to `true`.
  # 
  exported = true

  # Additional properties used when evaluating templates.
  #  
  extraProperties.foo = "bar"
  # Key will be capitalized and prefixed with `jpackage`, i.e, `jpackageFoo`.

  # Key value pairs.
  # Keys match a full platform or an os.name, os.arch.
  # Same rules apply as in Platform.
  # 
  [assemble.jpackage.app.platform.replacements]
    osx-x86_64 = "mac"
    aarch_64 = "aarch64"
    x86_64 = "amd64"
    linux_musl = "alpine"

  # Name of the jlink assembler to be reused.
  # 
  jlink = "app-jlink"

  # Attach the current platform to generated installers.
  # 
  # Defaults to `false`.
  attachPlatform = true

  # Enables verbose output.
  # Defaults to `false`.
  # 
  verbose = true

  # Directory with file templates used to prepare the Jpackage assembler.
  # Defaults to `src/jreleaser/assemblers/${distribution.name}/jpackage`.
  # If specified, path must exist.
  # 
  templateDirectory = "path/to/jpackage/templates"

  # Path to a runtime image created with jlink.
  # Must define a value for `platform`.
  #  
  runtimeImages = [
    { path = "path/to/runtime-image-osx", platform = "osx-x86_64" },
    { path = "path/to/runtime-image-osx", platform = "linux-x86_64" },
    { path = "path/to/runtime-image-windows", platform = "windows-x86_64" }]

  # 
  [assemble.jpackage.app.applicationPackage]

    # Name of the application and/or package.
    # If left undefined, will use `${assembler.name}`.
    #  
    appName = "App"

    # Version of the application and/or package.
    # If left undefined, will use `${project.version}`.
    #  
    appVersion = "1.0"

    # Vendor of the application.
    # If left undefined, will use `${project.vendor}`.
    # 
    vendor = "Acme"

    # Copyright for the application.
    # If left undefined, will use `${project.copyright}`.
    # 
    copyright = "Duke 2021"

    # Path to the license file.
    #  
    licenseFile = "path/to/LICENSE"

  # 
  [assemble.jpackage.app.launcher]

    # Command line arguments to pass to the main class if no command
    # line arguments are given to the launcher.
    # 
    arguments = ["--version"]

    # Options to pass to the Java runtime
    # 
    javaOptions = ["-Xmx2048m"]

    # Name of launcher, and a path to a Properties file that contains
    # a list of key, value pairs.
    # The keys "module", "main-jar", "main-class",
    # "arguments", "java-options", "app-version", "icon", and
    # "win-console" can be used.
    # These options are added to, or used to overwrite, the original
    # command line options to build an additional alternative launcher.
    # The main application launcher will be built from the command line
    # options. Additional alternative launchers can be built using
    # this option, and this option can be used multiple times to
    # build multiple additional launchers.
    # 
    launchers = ["alt=path/to/alt.properties"]

  # 
  [assemble.jpackage.app.linux]

    # Name of the application and/or package.
    # If left undefined, will use `${applicationPackage.name}`.
    #  
    appName = "App"

    # Path to the application's icon.
    # Must be in PNG format.
    # Will use default icon if undefined.
    #  
    icon = "path/to/app.png"

    # Absolute path of the installation directory of the application.
    #  
    installDir = "/usr/local/share/app"

    # Path to override jpackage resources.
    # Icons, template files, and other resources of jpackage can be
    # over-ridden by adding replacement resources to this directory.
    #  
    resourceDir = "path/to/resources"

    # The type of package to create.
    # Valid values are [`rpm`, `deb`].
    # 
    types = ["rpm", "deb"]

    # The JDK to use.
    # If undefined, will use the current JDK.
    #  
    jdk = { path = "path/to/jdk" }

    # Name for Linux package.
    # If undefined, will use the assembler's name.
    # 
    packageName = "app"

    # Maintainer for .deb package.
    # 
    maintainer = "duke"

    # Menu group this application is placed in.
    # 
    menuGroup = "apps"

    # Type of the license ("License: " of the RPM .spec).
    # If undefined, will use `${project.license}`
    # 
    license = "MIT"

    # Release value of the RPM .spec file or
    # Debian revision value of the DEB control file.
    # 
    appRelease = "1"

    # Group value of the RPM .spec file or
    # Section value of DEB control file.
    # 
    appCategory = "devel"

    # Creates a shortcut for the application
    # 
    shortcut = true

    # Required packages or capabilities for the application
    # 
    packageDeps = ["foobar"]

  # 
  [assemble.jpackage.app.osx]

    # Name of the application and/or package.
    # If left undefined, will use `${applicationPackage.name}`.
    #  
    appName = "App"

    # Path to the application's icon.
    # Must be in ICNS format.
    # Will use default icon if undefined.
    #  
    icon = "path/to/app.icns"

    # Absolute path of the installation directory of the application.
    #  
    installDir = "/Applications/app"

    # Path to override jpackage resources.
    # Icons, template files, and other resources of jpackage can be
    # over-ridden by adding replacement resources to this directory.
    #  
    resourceDir = "path/to/resources"

    # The type of package to create.
    # Valid values are [`dmg`, `pkh`].
    # 
    types = ["dmg", "pkg"]

    # The JDK to use.
    # If undefined, will use the current JDK.
    #  
    jdk = { path = "path/to/jdk" }

    # 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.
    # If undefined, will use the assembler's name.
    # 
    packageName = "app"

    # 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.
    # 
    packageIdentifier = "com.acme.app"

    # 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.
    # 
    packageSigningPrefix = "com.acme"

    # Path of the keychain to search for the signing identity.
    # If not specified, the standard keychains are used.
    #  
    signingKeychain = "path/to/keychain"

    # Team name portion in Apple signing identities' names.
    # 
    signingKeyUsername = "duke"

    # Request that the package be signed
    # Defaults to `false`.
    # 
    sign = true

  # 
  [assemble.jpackage.app.windows]

    # Name of the application and/or package.
    # If left undefined, will use `${applicationPackage.name}`.
    #  
    appName = "App"

    # Path to the application's icon.
    # Must be in ICO format.
    # Will use default icon if undefined.
    #  
    icon = "path/to/app.ico"

    # Absolute path of the installation directory of the application.
    #  
    installDir = "C:\\\\Applications\\App"

    # Path to override jpackage resources.
    # Icons, template files, and other resources of jpackage can be
    # over-ridden by adding replacement resources to this directory.
    #  
    resourceDir = "c:\\\\path\\to\\resources"

    # The type of package to create.
    # Valid values are [`exe`, `msi`].
    # 
    types = ["exe", "msi"]

    # The JDK to use.
    # If undefined, will use the current JDK.
    #  
    jdk = { path = "path/to/jdk" }

    # Creates a console launcher for the application, should be
    # specified for application which requires console interactions.
    # Defaults to `false`.
    # 
    console = true

    # Adds a dialog to enable the user to choose a directory in which
    # the product is installed.
    # Defaults to `false`.
    # 
    dirChooser = true

    # Adds the application to the system menu.
    # Defaults to `false`.
    # 
    menu = true

    # Request to perform an install on a per-user basis.
    # Defaults to `false`.
    # 
    perUserInstall = true

    # Creates a desktop shortcut for the application.
    # Defaults to `false`.
    # 
    shortcut = true

    # Start Menu group this application is placed in.
    # 
    menuGroup = "Applications"

    # UUID associated with upgrades for this package.
    # 
    upgradeUuid = "ba209999-0c6c-11d2-97cf-00c04f8eea45"

  # The executable JAR that contains the application.
  #  
  mainJar = { path = "path/to/app.jar" }

  # Defines a list of additional JARs as globs.
  # 
  [[assemble.jlink.app.jars]]
    # The pattern to use.
    # May use glob or regex pattern syntax.
    #  
    pattern = "path/to/**/*.jar"

  # Maven coordinates: groupId.
  # If left undefined, will use ${project.java.groupId}.
  # 
  java.groupId = "com.acme"

  # Maven coordinates: artifactId.
  # If left undefined, will use ${project.java.artifactId}.
  # 
  java.artifactId = "app"

  # The minimum Java version required by consumers to run the application.
  # If left undefined, will use ${project.java.version}.
  # 
  java.version = "8"

  # Name of main module (if any).
  # Define only if the application is modular.
  # 
  java.mainModule = "com.acme.demo"

  # The application's entry point.
  # If left undefined, will use ${project.java.mainClass}.
  # 
  java.mainClass = "com.acme.Main"

  # Identifies the project as being member of a multi-project build.
  # If left undefined, will use ${project.java.multiProject}.
  # 
  java.multiProject = false

  # Additional properties used when evaluating templates.
  # 
  java.extraProperties.foo = "bar"
  # Key will be capitalized and prefixed with `java`, i.e, `javaFoo`.

  # Defines a list of additional files as globs.
  # These files will be added to the assembled Zip file.
  # 
  [[assemble.jpackage.app.files]]
    # The pattern to use.
    # May use glob or regex pattern syntax.
    #  
    pattern = "path/to/**/*.txt"

  # Defines a list of additional files as filesets.
  # These files will be added to the assembled Zip file.
  # 
  [[assemble.jpackage.app.fileSets]]
    # The input directory to copy files from.
    #  
    input = "path/to/input/directory"

    # The target path inside the archive.
    # If left undefined, defaults to the root of the archive.
    #  
    output = "path/to/archive/entry"

    # Fail if the given `input` does not exist.
    # Defaults to `true`.
    # 
    failOnMissingInput = false

    # A set of files and directory to include.
    #  
    includes = ["name_or_regex"]

    # A set of files and directory to exclude.
    #  
    excludes = ["name_or_regex"]

    # Additional properties used when evaluating templates.
    #  
    [[assemble.jpackage.app.fileSets.extraProperties]]
      # Key will be capitalized and prefixed with `artifact`, i.e, `artifactFoo`.
      foo: bar
{
  // 
  "assemble": {
    // 
    "jpackage": {
      // Assemblers require a name.
      // 
      "app": {

        // Enables or disables the assembler.
        // Valid values are [`NEVER`, `ALWAYS`, `RELEASE`, `SNAPSHOT`].
        // Defaults to `NEVER`.
        // 
        "active": "ALWAYS",

        // Export the assembled artifacts as a matching named distribution.
        // Defaults to `true`.
        // 
        "exported": true,

        // Additional properties used when evaluating templates.
        //  
        "extraProperties": {
          // Key will be capitalized and prefixed with `jpackage`, i.e, `jpackageFoo`.
          "foo": "bar"
        },

        platform: {
          // Key value pairs.
          // Keys match a full platform or an os.name, os.arch.
          // Same rules apply as in Platform.
          // 
          "replacements": {
            "osx-x86_64": "mac",
            "aarch_64": "aarch64",
            "x86_64": "amd64",
            "linux_musl": "alpine"
          }
        },

        // Name of the jlink assembler to be reused.
        // 
        "jlink": "app-jlink",

        // Attach the current platform to generated installers.
        // Defaults to `false`.
        // 
        "attachPlatform": true,

        // Enables verbose output.
        // Defaults to `false`.
        // 
        "verbose": true,

        // Directory with file templates used to prepare the Jpackage assembler.
        // Defaults to `src/jreleaser/assemblers/${distribution.name}/jpackage`.
        // If specified, path must exist.
        // 
        "templateDirectory": "path/to/jpackage/templates",

        // Path to a runtime image created with jlink.
        // Must define a value for `platform`.
        //  
        "runtimeImages": [
          {
            "path": "path/to/runtime-image-osx",
            "platform": "osx-x86_64"
          },
          {
            "path": "path/to/runtime-image-linux",
            "platform": "linux-x86_64"
          },
          {
            "path": "path/to/runtime-image-windos",
            "platform": "windows-x86_64"
          }
        ],

        // 
        "applicationPackage": {

          // Name of the application and/or package.
          // If left undefined, will use `${assembler.name}`.
          //  
          "appName": "App",

          // Version of the application and/or package.
          // If left undefined, will use `${project.version}`.
          //  
          "appVersion": "1.0",

          // Vendor of the application.
          // If left undefined, will use `${project.vendor}`.
          // 
          "vendor": "Acme",

          // Copyright for the application.
          // If left undefined, will use `${project.copyright}`.
          // 
          "copyright": "Duke 2021",

          // Path to the license file.
          //  
          "licenseFile": "path/to/LICENSE"
        },

        // 
        "launcher": {

          // Command line arguments to pass to the main class if no command
          // line arguments are given to the launcher.
          // 
          "arguments": ["--version"],

          // Options to pass to the Java runtime
          // 
          "javaOptions": ["-Xmx2048m"],

          // Name of launcher, and a path to a Properties file that contains
          // a list of key, value pairs.
          // The keys "module", "main-jar", "main-class",
          // "arguments", "java-options", "app-version", "icon", and
          // "win-console" can be used.
          // These options are added to, or used to overwrite, the original
          // command line options to build an additional alternative launcher.
          // The main application launcher will be built from the command line
          // options. Additional alternative launchers can be built using
          // this option, and this option can be used multiple times to
          // build multiple additional launchers.
          // 
          "launchers": ["alt=path/to/alt.properties"]
        },

        // 
        "linux": {

          // Name of the application and/or package.
          // If left undefined, will use `${applicationPackage.name}`.
          //  
          "appName": "App",

          // Path to the application's icon.
          // Must be in PNG format.
          // Will use default icon if undefined.
          //  
          "icon": "path/to/app.png",

          // Absolute path of the installation directory of the application.
          //  
          "installDir": "/usr/local/share/app",

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

          // The type of package to create.
          // Valid values are [`rpm`, `deb`].
          // 
          "types": ["rpm", "deb"],

          // The JDK to use.
          // If undefined, will use the current JDK.
          //  
          "jdk": {
            "path": "path/to/jdk"
          },

          // Name for Linux package.
          // If undefined, will use the assembler's name.
          // 
          "packageName": "app",

          // Maintainer for .deb package.
          // 
          "maintainer": "duke",

          // Menu group this application is placed in.
          // 
          "menuGroup": "apps",

          // Type of the license ("License: " of the RPM .spec).
          // If undefined, will use `${project.license}`
          // 
          "license": "MIT",

          // Release value of the RPM .spec file or
          // Debian revision value of the DEB control file.
          // 
          "appRelease": "1",

          // Group value of the RPM .spec file or
          // Section value of DEB control file.
          // 
          "appCategory": "devel",

          // Creates a shortcut for the application
          // 
          "shortcut": true,

          // Required packages or capabilities for the application
          // 
          "packageDeps": ["foobar"]
        },

        // 
        "osx": {

          // Name of the application and/or package.
          // If left undefined, will use `${applicationPackage.name}`.
          //  
          "appName": "App",

          // Path to the application's icon.
          // Must be in ICNS format.
          // Will use default icon if undefined.
          //  
          "icon": "path/to/app.icns",

          // Absolute path of the installation directory of the application.
          //  
          "installDir": "/Applications/app",

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

          // The type of package to create.
          // Valid values are [`dmg`, `pkh`].
          // 
          "types": ["dmg", "pkg"],

          // The JDK to use.
          // If undefined, will use the current JDK.
          //  
          "jdk": {
            "path": "path/to/jdk"
          },

          // 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.
          // If undefined, will use the assembler's name.
          // 
          "packageName": "app",

          // 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.
          // 
          "packageIdentifier": "com.acme.app",

          // 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.
          // 
          "packageSigningPrefix": "com.acme",

          // Path of the keychain to search for the signing identity.
          // If not specified, the standard keychains are used.
          //  
          "signingKeychain": "path/to/keychain",

          // Team name portion in Apple signing identities' names.
          // 
          "signingKeyUsername": "duke",

          // Request that the package be signed
          // Defaults to `false`.
          // 
          "sign": true
        },

        // 
        "windows": {

          // Name of the application and/or package.
          // If left undefined, will use `${applicationPackage.name}`.
          //  
          "appName": "App",

          // Path to the application's icon.
          // Must be in ICO format.
          // Will use default icon if undefined.
          //  
          "icon": "path/to/app.ico",

          // Absolute path of the installation directory of the application.
          //  
          "installDir": "'C:\\\\Applications\\App",

          // Path to override jpackage resources.
          // Icons, template files, and other resources of jpackage can be
          // over-ridden by adding replacement resources to this directory.
          //  
          "resourceDir": "C:\\\\path\\to\\resources",

          // The type of package to create.
          // Valid values are [`exe`, `msi`].
          // 
          "types": ["exe", "msi"],

          // The JDK to use.
          // If undefined, will use the current JDK.
          //  
          "jdk": {
            "path": "path/to/jdk"
          },

          // Creates a console launcher for the application, should be
          // specified for application which requires console interactions.
          // Defaults to `false`.
          // 
          "console": true,

          // Adds a dialog to enable the user to choose a directory in which
          // the product is installed.
          // Defaults to `false`.
          // 
          "dirChooser": true,

          // Adds the application to the system menu.
          // Defaults to `false`.
          // 
          "menu": true,

          // Request to perform an install on a per-user basis.
          // Defaults to `false`.
          // 
          "perUserInstall": true,

          // Creates a desktop shortcut for the application.
          // Defaults to `false`.
          // 
          "shortcut": true,

          // Start Menu group this application is placed in.
          // 
          "menuGroup": "Applications",

          // UUID associated with upgrades for this package.
          // 
          "upgradeUuid": "ba209999-0c6c-11d2-97cf-00c04f8eea45"
        },

        // The executable JAR that contains the application.
        //  
        "mainJar": {
          "path": "path/to/app.jar"
        },

        // Defines a list of additional JARs as globs.
        // 
        "jars": [
          {
            // The pattern to use.
            // May use glob or regex pattern syntax.
            //  
            "pattern": "path/to/**/*.jar"
          }
        ],

        // 
        "java": {
          // Maven coordinates: groupId.
          // If left undefined, will use ${project.java.groupId}.
          // 
          "groupId": "com.acme",

          // Maven coordinates: artifactId.
          // If left undefined, will use ${project.java.artifactId}.
          // 
          "artifactId": "app",

          // The minimum Java version required by consumers to run the application.
          // If left undefined, will use ${project.java.version}.
          // 
          "version": "8",

          // Name of main module (if any).
          // Define only if the application is modular.
          // 
          "mainModule": "com.acme.demo",

          // The application's entry point.
          // If left undefined, will use ${project.java.mainClass}.
          // 
          "mainClass": "com.acme.Main",

          // Identifies the project as being member of a multi-project build.
          // If left undefined, will use ${project.java.multiProject}.
          // 
          "multiProject": false,

          // Additional properties used when evaluating templates.
          // 
          "extraProperties": {
            // Key will be capitalized and prefixed with `java`, i.e, `javaFoo`.
            "foo": "bar"
          }
        },

        // Defines a list of additional files as globs.
        // These files will be added to the assembled Zip file.
        // 
        "files": [
          {
            // The pattern to use.
            // May use glob or regex pattern syntax.
            //  
            "pattern": "path/to/**/*.txt"
          }
        ],

        // Defines a list of additional files as filesets.
        // These files will be added to the assembled Zip file.
        // 
        "fileSets": [
          {
            // The input directory to copy files from.
            //  
            "input": "path/to/input/directory",

            // The target path inside the archive.
            // If left undefined, defaults to the root of the archive.
            //  
            "output": "path/to/archive/entry",

            // Fail if the given `input` does not exist.
            // Defaults to `true`.
            // 
            "failOnMissingInput": false,

            // A set of files and directory to include.
            //  
            "includes": ["name_or_regex"],

            // A set of files and directory to exclude.
            //  
            "excludes": ["name_or_regex"],

            // Additional properties used when evaluating templates.
            //  
            "extraProperties": {
              // Key will be capitalized and prefixed with `artifact`, i.e, `artifactFoo`.
              "foo": "bar"
            }
          }
        ]
      }
    }
  }
}
<jreleaser>
  <!--
    
  -->
  <assemble>
    <!--
      
    -->
    <jpackage>
      <!--
        Assemblers require a name.
        
      -->
      <app>
        <!--
          Enables or disables the distribution.
          Valid values are [`NEVER`, `ALWAYS`, `RELEASE`, `SNAPSHOT`].
          Defaults to `ALWAYS`.
          
        -->
        <active>ALWAYS</active>

        <!--
          Export the assembled artifacts as a matching named distribution.
          Defaults to `true`.
          
        -->
        <exported>true</exported>

        <!--
          Additional properties used when evaluating templates.
           
        -->
        <extraProperties>
          <!--
            Key will be capitalized and prefixed with `jpackage`, i.e, `jpackageFoo`.
          -->
          <foo>bar</foo>
        </extraProperties>

        <!--
          
        -->
        <platform>

          <!--
            Key value pairs.
            Keys match a full platform or an os.name, os.arch.
            Same rules apply as in Platform.
            
          -->
          <replacements>
            <osx-x86_64>mac</osx-x86_64>
            <aarch_64>aarch64</aarch_64>
            <x86_64>amd64</x86_64>
            <linux_musl>alpine</linux_musl>
          </replacements>
        </platform>

        <!--
          Name of the jlink assembler to be reused.
          
        -->
        <jlink>app-jlink</jlink>

        <!--
          Attach the current platform to generated installers.
          Defaults to `false`.
          
        -->
        <attachPlatform>true</attachPlatform>

        <!--
          Enables verbose output.
          Defaults to `false`.
          
        -->
        <verbose>true</verbose>

        <!--
          Directory with file templates used to prepare the Jpackage assembler.
          Defaults to `src/jreleaser/assemblers/${distribution.name}/jpackage`.
          If specified, path must exist.
          
        -->
        <templateDirectory>path/to/jpackage/templates</templateDirectory>

        <!--
          Path to a runtime image created with jlink.
          Must define a value for `platform`.
           
        -->
        <runtimeImages>
          <runtimeImage>
            <path>path/to/runtime-image-osx</path>
            <platform>osx-x86_64</platform>
          </runtimeImage>
          <runtimeImage>
            <path>path/to/runtime-image-linux</path>
            <platform>linux-x86_64</platform>
          </runtimeImage>
          <runtimeImage>
            <path>path/to/runtime-image-windows</path>
            <platform>windows-x86_64</platform>
          </runtimeImage>
        </runtimeImages>

        <!--
          
        -->
        <applicationPackage>

          <!--
            Name of the application and/or package.
            If left undefined, will use `${assembler.name}`.
             
          -->
          <appName>App</appName>

          <!--
            Version of the application and/or package.
            If left undefined, will use `${project.version}`.
             
          -->
          <appVersion>1.0</appVersion>

          <!--
            Vendor of the application.
            If left undefined, will use `${project.vendor}`.
            
          -->
          <vendor>Acme</vendor>

          <!--
            Copyright for the application.
            If left undefined, will use `${project.copyright}`.
            
          -->
          <copyright>Duke 2021</copyright>

          <!--
            Path to the license file.
             
          -->
          <licenseFile>path/to/LICENSE<l/icenseFile>
        </applicationPackage>

        <!--
          
        -->
        <launcher>

          <!--
            Command line arguments to pass to the main class if no command
            line arguments are given to the launcher.
            
          -->
          <arguments>--version</arguments>

          <!--
            Options to pass to the Java runtime
            
          -->
          <javaOptions>-Xmx2048m</javaOptions>

          <!--
            Name of launcher, and a path to a Properties file that contains
            a list of key, value pairs.
            The keys "module", "main-jar", "main-class",
            "arguments", "java-options", "app-version", "icon", and
            "win-console" can be used.
            These options are added to, or used to overwrite, the original
            command line options to build an additional alternative launcher.
            The main application launcher will be built from the command line
            options. Additional alternative launchers can be built using
            this option, and this option can be used multiple times to
            build multiple additional launchers.
            
          -->
          <launchers>
            <launcher>alt=path/to/alt.properties</launcher>
          </launcher>
        </launcher>

        <!--
          
        -->
        <linux>

          <!--
            Name of the application and/or package.
            If left undefined, will use `${applicationPackage.name}`.
             
          -->
          <appName>App</appName>

          <!--
            Path to the applications icon.
            Must be in PNG format.
            Will use default icon if undefined.
             
          -->
          <icon>path/to/app.png</icon>

          <!--
            Absolute path of the installation directory of the application.
             
          -->
          <installDir>/usr/local/share/app</installDir>

          <!--
            Path to override jpackage resources.
            Icons, template files, and other resources of jpackage can be
            over-ridden by adding replacement resources to this directory.
             
          -->
          <resourceDir>path/to/resources</resourceDir>

          <!--
            The type of package to create.
            Valid values are [`rpm`, `deb`].
            
          -->
          <types>rpm,deb</types>

          <!--
            The JDK to use.
            If undefined, will use the current JDK.
             
          -->
          <jdk>
            <path>path/to/jdk</path>
          </jdk>

          <!--
            Name for Linux package.
            If undefined, will use the assemblers name.
            
          -->
          <packageName>app</packageName>

          <!--
            Maintainer for .deb package.
            
          -->
          <maintainer>duke</maintainer>

          <!--
            Menu group this application is placed in.
            
          -->
          <menuGroup>apps</menuGroup>

          <!--
            Type of the license ("License: <value>" of the RPM .spec).
            If undefined, will use `${project.license}`
            
          -->
          <license>MIT</license>

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

          <!--
            Group value of the RPM <name>.spec file or
            Section value of DEB control file.
            
          -->
          <appCategory>devel</appCategory>

          <!--
            Creates a shortcut for the application
            
          -->
          <shortcut>true</shortcut>

          <!--
            Required packages or capabilities for the application
            
          -->
          <packageDeps>foobar</packageDeps>
        </linux>

        <!--
          
        -->
        <osx>

          <!--
            Name of the application and/or package.
            If left undefined, will use `${applicationPackage.name}`.
             
          -->
          <appName>App</appName>

          <!--
            Path to the applications icon.
            Must be in ICNS format.
            Will use default icon if undefined.
             
          -->
          <icon>path/to/app.icns</icon>

          <!--
            Absolute path of the installation directory of the application.
             
          -->
          <installDir>/Applications/app</installDir>

          <!--
            Path to override jpackage resources.
            Icons, template files, and other resources of jpackage can be
            over-ridden by adding replacement resources to this directory.
             
          -->
          <resourceDir>path/to/resources</resourceDir>

          <!--
            The type of package to create.
            Valid values are [`dmg`, `pkh`].
            
          -->
          <types>dmg,pkg</types>

          <!--
            The JDK to use.
            If undefined, will use the current JDK.
             
          -->
          <jdk>
            <path>path/to/jdk</path>
          </jdk>

          <!--
            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.
            If undefined, will use the assemblers name.
            
          -->
          <packageName>app</packageName>

          <!--
            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.
            
          -->
          <packageIdentifier>com.acme.app</packageIdentifier>

          <!--
            When signing the application package, this value is prefixed
            to all components that need to be signed that dont have
            an existing package identifier.
            
          -->
          <packageSigningPrefix>com.acme</packageSigningPrefix>

          <!--
            Path of the keychain to search for the signing identity.
            If not specified, the standard keychains are used.
             
          -->
          <signingKeychain>path/to/keychain</signingKeychain>

          <!--
            Team name portion in Apple signing identities names.
            
          -->
          <signingKeyUsername>duke</signingKeyUsername>

          <!--
            Request that the package be signed
            Defaults to `false`.
            
          -->
          <sign>true</sign>
        </osx>

        <!--
          
        -->
        <windows>

          <!--
            Name of the application and/or package.
            If left undefined, will use `${applicationPackage.name}`.
             
          -->
          <appName>App</appName>

          <!--
            Path to the applications icon.
            Must be in ICO format.
            Will use default icon if undefined.
             
          -->
          <icon>path/to/app.ico</icon>

          <!--
            Absolute path of the installation directory of the application.
             
          -->
          <installDir>C:\\\\Applications\\App</installDir>

          <!--
            Path to override jpackage resources.
            Icons, template files, and other resources of jpackage can be
            over-ridden by adding replacement resources to this directory.
             
          -->
          <resourceDir>C:\\\\path\\to\\resources</resourceDir>

          <!--
            The type of package to create.
            Valid values are [`exe`, `msi`].
            
          -->
          <types>exe,msi</types>

          <!--
            The JDK to use.
            If undefined, will use the current JDK.
             
          -->
          <jdk>
            <path>path/to/jdk</path>
          </jdk>

          <!--
            Creates a console launcher for the application, should be
            specified for application which requires console interactions.
            Defaults to `false`.
            
          -->
          <console>true</console>

          <!--
            Adds a dialog to enable the user to choose a directory in which
            the product is installed.
            Defaults to `false`.
            
          -->
          <dirChooser>true</dirChooser>

          <!--
            Adds the application to the system menu.
            Defaults to `false`.
            
          -->
          <menu>true</menu>

          <!--
            Request to perform an install on a per-user basis.
            Defaults to `false`.
            
          -->
          <perUserInstall>true</perUserInstall>

          <!--
            Creates a desktop shortcut for the application.
            Defaults to `false`.
            
          -->
          <shortcut>true</shortcut>

          <!--
            Start Menu group this application is placed in.
            
          -->
          <menuGroup>Applications</menuGroup>

          <!--
            UUID associated with upgrades for this package.
            
          -->
          <upgradeUuid>ba209999-0c6c-11d2-97cf-00c04f8eea45</upgradeUuid>
        </windows>

        <!--
          The executable JAR that contains the application.
           
        -->
        <mainJar>
          <path>path/to/app.jar</path>
        </mainJar>

        <!--
          Defines a list of additional JARs as globs.
          
        -->
        <jars>
          <jar>
            <!--
              The pattern to use.
              May use glob or regex pattern syntax.
               
            -->
            <pattern>path/to/**/*.jar</pattern>
          </jar>
        </jars>

        <!--
          
        -->
        <java>
          <!--
            Maven coordinates>groupId.
            If left undefined, will use ${project.java.groupId}.
            
          -->
          <groupId>com.acme</groupId>

          <!--
            Maven coordinates>artifactId.
            If left undefined, will use ${project.java.artifactId}.
            
          -->
          <artifactId>app</artifactId>

          <!--
            The minimum Java version required by consumers to run the application.
            If left undefined, will use ${project.java.version}.
            
          -->
          <version>8</version>

          <!--
            Name of main module (if any).
            Define only if the application is modular.
            
          -->
          <mainModule>com.acme.demo</mainModule>

          <!--
            The application's entry point.
            If left undefined, will use ${project.java.mainClass}.
            
          -->
          <mainClass>com.acme.Main</mainClass>

          <!--
            Identifies the project as being member of a multi-project build.
            If left undefined, will use ${project.java.multiProject}.
            
          -->
          <multiProject>false</multiProject>

          <!--
            Additional properties used when evaluating templates.
            
          -->
          <extraProperties>
            <!--
              Key will be capitalized and prefixed with `java`, i.e, `javaFoo`.
            -->
            <foo>bar</foo>
          </extraProperties>
        </java>

        <!--
          Defines a list of additional files as globs.
          These files will be added to the assembled Zip file.
          
        -->
        <files>
          <file>
            <!--
              The pattern to use.
              May use glob or regex pattern syntax.
               
            -->
            <pattern>path/to/**/*.txt</pattern>
          </file>
        </files>

        <!--
          Defines a list of additional files as filesets.
          These files will be added to the assembled Zip file.
          
        -->
        <fileSets>
          <fileSet>
            <!--
              The input directory to copy files from.
               
            -->
            <input>path/to/input/directory</input>

            <!--
              The target path inside the archive.
              If left undefined, defaults to the root of the archive.
               
            -->
            <output>path/to/archive/entry</output>

            <!--
              Fail if the given `input` does not exist.
              Defaults to `true`.
              
            -->
            <failOnMissingInput>false</failOnMissingInput>

            <!--
              A set of files and directory to include.
               
            -->
            <includes>
              <include>name_or_regex</include>
            </includes>

            <!--
              A set of files and directory to exclude.
               
            -->
            <excludes>
              <exclude>name_or_regex</exclude>
            </excludes>

            <!--
              Additional properties used when evaluating templates.
              
            -->
            <extraProperties>
              <!--
                Key will be capitalized and prefixed with `artifact`, i.e, `artifactFoo`.
              -->
              <foo>bar</foo>
            </extraProperties>
          </fileSet>
        </fileSets>
      </app>
    </jpackage>
  </assemble>
</jreleaser>
jreleaser {
  // 
  assemble {
    // 
    jpackage {
      // Assemblers require a name.
      // 
      app {

        // Enables or disables the assembler.
        // Valid values are [`NEVER`, `ALWAYS`, `RELEASE`, `SNAPSHOT`].
        // Defaults to `NEVER`.
        // 
        active = 'ALWAYS'

        // Export the assembled artifacts as a matching named distribution.
        // Defaults to `true`.
        // 
        exported = true

        // Additional properties used when evaluating templates.
        // Key will be capitalized and prefixed with `jpackage`, i.e, `jpackageFoo`.
        //  
        extraProperties.put('foo', 'bar')

        // 
        platform {

          // Key value pairs.
          // Keys match a full platform or an os.name, os.arch.
          // Same rules apply as in Platform.
          // 
          replacements = [
            'osx-x86_64': 'mac',
            aarch_64: 'aarch64',
            x86_64: 'amd64',
            linux_musl: 'alpine'
          ]
        }

        // Name of the jlink assembler to be reused.
        // 
        jlink = 'app-jlink'

        // Attach the current platform to generated installers.
        // Defaults to `false`.
        // 
        attachPlatform = true

        // Enables verbose output.
        // Defaults to `false`.
        // 
        verbose = true

        // Directory with file templates used to prepare the Jpackage assembler.
        // Defaults to `src/jreleaser/assemblers/${distribution.name}/jpackage`.
        // If specified, path must exist.
        // 
        templateDirectory = 'path/to/jpackage/templates'

        // Path to a runtime image created with jlink.
        // Must define a value for `platform`.
        //  
        runtimeImage {
          path = 'path/to/runtime-image-osx'
          platform = 'osx-x86_64'
        }
        runtimeImage {
          path = 'path/to/runtime-image-linux'
          platform = 'linux-x86_64'
        }
        runtimeImage {
          path = 'path/to/runtime-image-windows'
          platform = 'windows-x86_64'
        }

        // 
        applicationPackage {

          // Name of the application and/or package.
          // If left undefined, will use `${assembler.name}`.
          //  
          appName = 'App'

          // Version of the application and/or package.
          // If left undefined, will use `${project.version}`.
          //  
          appVersion = '1.0'

          // Vendor of the application.
          // If left undefined, will use `${project.vendor}`.
          // 
          vendor = 'Acme'

          // Copyright for the application.
          // If left undefined, will use `${project.copyright}`.
          // 
          copyright = 'Duke 2021'

          // Path to the license file.
          //  
          licenseFile = 'path/to/LICENSE'
        }

        // 
        launcher {

          // Command line arguments to pass to the main class if no command
          // line arguments are given to the launcher.
          // 
          arguments = ['--version']

          // Options to pass to the Java runtime
          // 
          javaOptions = ['-Xmx2048m']

          // Name of launcher, and a path to a Properties file that contains
          // a list of key, value pairs.
          // The keys "module", "main-jar", "main-class",
          // "arguments", "java-options", "app-version", "icon", and
          // "win-console" can be used.
          // These options are added to, or used to overwrite, the original
          // command line options to build an additional alternative launcher.
          // The main application launcher will be built from the command line
          // options. Additional alternative launchers can be built using
          // this option, and this option can be used multiple times to
          // build multiple additional launchers.
          // 
          launchers = ['alt=path/to/alt.properties']
        }

        // 
        linux {

          // Name of the application and/or package.
          // If left undefined, will use `${applicationPackage.name}`.
          //  
          appName = 'App'

          // Path to the application's icon.
          // Must be in PNG format.
          // Will use default icon if undefined.
          //  
          icon = 'path/to/app.png'

          // Absolute path of the installation directory of the application.
          //  
          installDir = '/usr/local/share/app'

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

          // The type of package to create.
          // Valid values are [`rpm`, `deb`].
          // 
          types = ['rpm', 'deb']

          // The JDK to use.
          // If undefined, will use the current JDK.
          //  
          jdk {
            path = 'path/to/jdk'
          }

          // Name for Linux package.
          // If undefined, will use the assembler's name.
          // 
          packageName = 'app'

          // Maintainer for .deb package.
          // 
          maintainer = 'duke'

          // Menu group this application is placed in.
          // 
          menuGroup = 'apps'

          // Type of the license ("License: " of the RPM .spec).
          // If undefined, will use `${project.license}`
          // 
          license = 'MIT'

          // Release value of the RPM .spec file or
          // Debian revision value of the DEB control file.
          // 
          appRelease = '1'

          // Group value of the RPM .spec file or
          // Section value of DEB control file.
          // 
          appCategory = 'devel'

          // Creates a shortcut for the application
          // 
          shortcut = true

          // Required packages or capabilities for the application
          // 
          packageDeps = ['foobar']
        }

        // 
        osx {

          // Name of the application and/or package.
          // If left undefined, will use `${applicationPackage.name}`.
          //  
          appName = 'App'

          // Path to the application's icon.
          // Must be in ICNS format.
          // Will use default icon if undefined.
          //  
          icon = 'path/to/app.icns'

          // Absolute path of the installation directory of the application.
          //  
          installDir = '/Applications/app'

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

          // The type of package to create.
          // Valid values are [`dmg`, `pkh`].
          // 
          types = ['dmg', 'pkg']

          // The JDK to use.
          // If undefined, will use the current JDK.
          //  
          jdk {
            path = 'path/to/jdk'
          }

          // 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.
          // If undefined, will use the assembler's name.
          // 
          packageName = 'app'

          // 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.
          // 
          packageIdentifier = 'com.acme.app'

          // 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.
          // 
          packageSigningPrefix = 'com.acme'

          // Path of the keychain to search for the signing identity.
          // If not specified, the standard keychains are used.
          //  
          signingKeychain = 'path/to/keychain'

          // Team name portion in Apple signing identities' names.
          // 
          signingKeyUsername = 'duke'

          // Request that the package be signed
          // Defaults to `false`.
          // 
          sign = true
        }

        // 
        windows {

          // Name of the application and/or package.
          // If left undefined, will use `${applicationPackage.name}`.
          //  
          appName = 'App'

          // Path to the application's icon.
          // Must be in ICO format.
          // Will use default icon if undefined.
          //  
          icon = 'path/to/app.ico'

          // Absolute path of the installation directory of the application.
          //  
          installDir = 'C:\\\\Applications\\App'

          // Path to override jpackage resources.
          // Icons, template files, and other resources of jpackage can be
          // over-ridden by adding replacement resources to this directory.
          //  
          resourceDir = 'C:\\\\path\\to\\resources'

          // The type of package to create.
          // Valid values are [`exe`, `msi`].
          // 
          types = ['exe', 'msi']

          // The JDK to use.
          // If undefined, will use the current JDK.
          //  
          jdk {
            path = 'path/to/jdk'
          }

          // Creates a console launcher for the application, should be
          // specified for application which requires console interactions.
          // Defaults to `false`.
          // 
          console = true

          // Adds a dialog to enable the user to choose a directory in which
          // the product is installed.
          // Defaults to `false`.
          // 
          dirChooser = true

          // Adds the application to the system menu.
          // Defaults to `false`.
          // 
          menu = true

          // Request to perform an install on a per-user basis.
          // Defaults to `false`.
          // 
          perUserInstall = true

          // Creates a desktop shortcut for the application.
          // Defaults to `false`.
          // 
          shortcut = true

          // Start Menu group this application is placed in.
          // 
          menuGroup = 'Applications'

          // UUID associated with upgrades for this package.
          // 
          upgradeUuid = 'ba209999-0c6c-11d2-97cf-00c04f8eea45'
        }

        // The executable JAR that contains the application.
        //  
        mainJar {
          path = 'path/to/app.jar'
        }

        // Defines a list of additional JARs as globs.
        // 
        jars {
          // The pattern to use.
          // May use glob or regex pattern syntax.
          //  
          pattern = 'path/to/**/*.jar'
        }

        // 
        java {
          // Maven coordinates = groupId.
          // If left undefined, will use ${project.java.groupId}.
          // 
          groupId = 'com.acme'

          // Maven coordinates = artifactId.
          // If left undefined, will use ${project.java.artifactId}.
          // 
          artifactId = 'app'

          // The minimum Java version required by consumers to run the application.
          // If left undefined, will use ${project.java.version}.
          // 
          version = '8'

          // Name of main module (if any).
          // Define only if the application is modular.
          // 
          mainModule = 'com.acme.demo'

          // The application's entry point.
          // If left undefined, will use ${project.java.mainClass}.
          // 
          mainClass = 'com.acme.Main'

          // Identifies the project as being member of a multi-project build.
          // If left undefined, will use ${project.java.multiProject}.
          // 
          multiProject = false

          // Additional properties used when evaluating templates.
          // Key will be capitalized and prefixed with `java`, i.e, `javaFoo`.
          // 
          extraProperties.put('foo', 'bar')
        }

        // Defines a list of additional files as globs.
        // These files will be added to the assembled Zip file.
        // 
        files {
          // The pattern to use.
          // May use glob or regex pattern syntax.
          //  
          pattern = 'path/to/**/*.txt'
        }

        // Defines a list of additional files as filesets.
        // These files will be added to the assembled Zip file.
        // 
        fileSet {
          // The input directory to copy files from.
          //  
          input = 'path/to/input/directory'

          // The target path inside the archive.
          // If left undefined, defaults to the root of the archive.
          //  
          output = 'path/to/archive/entry'

          // Fail if the given `input` does not exist.
          // Defaults to `true`.
          // 
          failOnMissingInput = false

          // A set of files and directory to include.
          //  
          includes = ['name_or_regex']

          // A set of files and directory to exclude.
          //  
          excludes = ['name_or_regex']

          // Additional properties used when evaluating templates.
          // Key will be capitalized and prefixed with `artifact`, i.e, `artifactFoo`.
          //  
          extraProperties.put('foo', 'bar')
        }
      }
    }
  }
}

JDK

The path for jdk must exist in the file system. You may use the maven jdks-maven-plugin or gradle jdks-gradle-plugin to download a JDK distribution.

Templates

The default location for templates is:

src/jreleaser/assemblers/<distribution-name>/jpackage

Examples

you may have JReleaser assemble a runtime image via Jlink and consume it with this assembler. The following snippet shows how to configure a non-exported jlink assembly named app-jlink which is consumed by a jpackage assembly named app. This in turns creates a Native Package distribution named app.

project:
  version: '1.0.0'
  name: app
  description: Awesome App
  longDescription: Awesome App is awesome

  website: https://acme.com/app
  authors:
    - Duke
  license: Apache-2.0
  vendor: Kordamp
  java:
    mainClass: com.acme.Main
    groupId: com.acme
    artifactId: app
    version: 17
  extraProperties:
    inceptionYear: 2021

assemble:
  jlink:
    app-jlink:
      active: always
      exported: false
      executable: app
      jdeps:
        multiRelease: 17
        ignoreMissingDeps: true
      copyJars: false
      mainJar:
        path: 'target/app-{{projectVersion}}.jar'
  jpackage:
    app:
      active: always
      exported: true
      jlink: app-jlink
      linux:
        types: [rpm]
      osx:
        types: [dmg]
      windows:
        types: [exe]

This creates the following files when run on Linux, OSX, and Windows nodes using the following command:

$ jreleaser assemble
  • app-1.0.0-1.x86_64.rpm

  • app-1.0.0.dmg

  • app-1.0.0.exe

Existing Runtime Image

If you have an existing runtime image that you’d like to reuse then configure it directly using the runtimeImage.path property. Assuming you have a suitable runtime image available at target/runtime-image then the following will create dmg and pkg files when run on OSX:

project:
  version: '1.0.0'
  name: app
  description: Awesome App
  longDescription: Awesome App is awesome

  website: https://acme.com/app
  authors:
    - Duke
  license: Apache-2.0
  vendor: Kordamp
  java:
    mainClass: com.acme.Main
    groupId: com.acme
    artifactId: app
    version: 17
  extraProperties:
    inceptionYear: 2021

assemble:
  jpackage:
    app:
      active: always
      exported: true
      runtimeImages:
        - path: path/to/runtime-image-osx
          platform: osx-x86_64
        - path: path/to/runtime-image-linux
          platform: linux-x86_64
        - path: path/to/runtime-image-windows
          platform: windows-x86_64
      mainJar:
        path: 'target/app-{{projectVersion}}.jar'
      linux:
        types: [rpm]
      osx:
        types: [dmg, pkg]
      windows:
        types: [exe]
$ jreleaser assemble
  • app-1.0.0.dmg

  • app-1.0.0.pkg