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.

Configuration

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.
      # Supported 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

      # The stereotype of this assembler.
      # Supported values are [`NONE`, `CLI`, `DESKTOP`, `WEB`, `MOBILE`].
      # Defaults to `#{project.stereotype}`.
      # 
      stereotype: CLI

      # 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

      # 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.
        # Supported 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: <value>" of the RPM .spec).
        # If undefined, will use `#{project.license}`
        # 
        license: MIT

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

        # Group value of the RPM <name>.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.
        # Supported 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.
        # Supported 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:
        # 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

        # Options to pass to the Java runtime
        # 
        jvmOptions:
          # Included in all scripts
          #  
          universal:
            - -Dprop=value
          # Included in all non Windows scripts
          #  
          unix:
            - -Dprop=value
          # Included in all non Windows (except OSX) scripts
          #  
          linux:
            - -Dprop=value
          # Included only in OSX scripts
          #  
          osx:
            - -Dprop=value
          # Included in Windows scripts
          #  
          windows:
            - -Dprop=value

        # Environment variables used in launch scripts.
        # 
        environmentVariables:
          # Included in all scripts
          #  
          universal:
            KEY: value
          # Included in all non Windows scripts
          #  
          unix:
            KEY: value
          # Included in all non Windows (except OSX) scripts
          #  
          linux:
            KEY: value
          # Included only in OSX scripts
          #  
          osx:
            KEY: value
          # Included in Windows scripts
          #  
          windows:
            KEY: value

        # 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

        # 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


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

      # List of template files to be skipped.
      # Value may be an exact match or a regex.
      # 
      skipTemplates:
        - README.md.tpl

      # Defines a list of additional files as artifacts.
      # These files will be added to the assembled archive.
      #  
      artifacts:
        - path: path/to/file
        - path: path/to/another_file
          transform: path/inside/archive
        - path: path/to/platform/specific/file
          platform: osx-x86_64

      # Defines a list of additional files as globs.
      # These files will be added to the assembled archive.
      # 
      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 archive.
      # 
      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.
  # Supported 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

  # The stereotype of this assembler.
  # Supported values are [`NONE`, `CLI`, `DESKTOP`, `WEB`, `MOBILE`].
  # Defaults to `#{project.stereotype}`.
  # 
  stereotype = "CLI"

  # 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

  # 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.
    # Supported 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: <value>" of the RPM .spec).
    # If undefined, will use `#{project.license}`
    # 
    license = "MIT"

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

    # Group value of the RPM <name>.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.
    # Supported 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.
    # Supported 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"

  # 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"

  # Options to pass to the Java runtime

  # Included in all scripts
  #  
  java.jvmOptions.universal = ["-Dprop=value"]

  # Included in all non Windows scripts
  #  
  java.jvmOptions.unix = ["-Dprop=value"]

  # Included in all non Windows (except OSX) scripts
  #  
  java.jvmOptions.linux = ["-Dprop=value"]

  # Included only in OSX scripts
  #  
  java.jvmOptions.osx = ["-Dprop=value"]

  # Included in Windows scripts
  #  
  java.jvmOptions.windows = ["-Dprop=value"]

  # Environment variables used in launch scripts.

  # Included in all scripts
  #  
  java.environmentVariables.universal.KEY = "value"

  # Included in all non Windows scripts
  #  
  java.environmentVariables.unix.KEY = "value"

  # Included in all non Windows (except OSX) scripts
  #  
  java.environmentVariables.linux.KEY = "value"

  # Included only in OSX scripts
  #  
  java.environmentVariables.osx.KEY = "value"

  # Included in Windows scripts
  #  
  java.environmentVariables.windows.KEY = "value"

  # 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"

  # 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`.

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

  # List of template files to be skipped.
  # Value may be an exact match or a regex.
  # 
  skipTemplates = [ "README.md.tpl" ]

  # Defines a list of additional files as artifacts.
  # These files will be added to the assembled archive.
  #  
  [[assemble.jpackage.app.artifacts]]
    path = "path/to/file"
  [[assemble.jpackage.app.artifacts]]
    path = "path/to/another_file"
    transform = "path/inside/archive"
  [[assemble.jpackage.app.artifacts]]
    path = "path/to/platform/specific/file"
    platform = "osx-x86_64"

  # Defines a list of additional files as globs.
  # These files will be added to the assembled archive.
  # 
  [[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 archive.
  # 
  [[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.
        // Supported 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,

        // The stereotype of this assembler.
        // Supported values are [`NONE`, `CLI`, `DESKTOP`, `WEB`, `MOBILE`].
        // Defaults to `#{project.stereotype}`.
        // 
        "stereotype": "CLI",

        // 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,

        // 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.
          // Supported 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: <value>" of the RPM .spec).
          // If undefined, will use `#{project.license}`
          // 
          "license": "MIT",

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

          // Group value of the RPM <name>.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.
          // Supported 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.
          // Supported 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": {
          // 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",

          // Options to pass to the Java runtime
          // 
          "jvmOptions": {
            // Included in all scripts
            //  
            "universal": [
              "-Dprop=value"
            ],
            // Included in all non Windows scripts
            //  
            "unix": [
              "-Dprop=value"
            ],
            // Included in all non Windows (except OSX) scripts
            //  
            "linux": [
              "-Dprop=value"
            ],
            // Included only in OSX scripts
            //  
            "osx": [
              "-Dprop=value"
            ],
            // Included in Windows scripts
            //  
            "windows": [
              "-Dprop=value"
            ]
          },

          // Environment variables used in launch scripts.
          // 
          "environmentVariables": {
            // Included in all scripts
            //  
            "universal": {
              "KEY": "value"
            },
            // Included in all non Windows scripts
            //  
            "unix": {
              "KEY": "value"
            },
            // Included in all non Windows (except OSX) scripts
            //  
            "linux": {
              "KEY": "value"
            },
            // Included only in OSX scripts
            //  
            "osx": {
              "KEY": "value"
            },
            // Included in Windows scripts
            //  
            "windows": {
              "KEY": "value"
            }
          },

          // 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",

          // 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"
          }
        },

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

        // List of template files to be skipped.
        // Value may be an exact match or a regex.
        // 
        "skipTemplates": [
          "README.md.tpl"
        ],

        // Defines a list of additional files as artifacts.
        // These files will be added to the assembled archive.
        //  
        "artifacts": [
          {
            "path": "path/to/file"
          },
          {
            "path": "path/to/another_file",
            "transform": "path/inside/archive"
          },
          {
            "path": "path/to/platform/specific/file",
            "platform": "osx-x86_64"
          }
        ]  ,

        // Defines a list of additional files as globs.
        // These files will be added to the assembled archive.
        // 
        "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 archive.
        // 
        "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.
          Supported 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>

        <!--
          The stereotype of this assembler.
          Supported values are [`NONE`, `CLI`, `DESKTOP`, `WEB`, `MOBILE`].
          Defaults to `#{project.stereotype}`.
          
        -->
        <stereotype>CLI</stereotype>

        <!--
          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>

        <!--
          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.
            Supported 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.
            Supported 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.
            Supported 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>
          <!--
            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>

          <!--
            Options to pass to the Java runtime
            
          -->
          <jvmOptions>
            <!--
              Included in all scripts
               
            -->
            <universal>-Dprop=value</universal>
            <!--
              Included in all non Windows scripts
               
            -->
            <unix>-Dprop=value</unix>
            <!--
              Included in all non Windows (except OSX) scripts
               
            -->
            <linux>-Dprop=value</linux>
            <!--
              Included only in OSX scripts
               
            -->
            <osx>-Dprop=value</osx>
            <!--
              Included in Windows scripts
               
            -->
            <windows>-Dprop=value</windows>
          </jvmOptions>

          <!--
            Environment variables used in launch scripts.
            
          -->
          <environmentVariables>
            <!--
              Included in all scripts
               
            -->
            <universal>
              <KEY>value</KEY>
            </universal>
            <!--
              Included in all non Windows scripts
               
            -->
            <unix>
              <KEY>value</KEY>
            </unix>
            <!--
              Included in all non Windows (except OSX) scripts
               
            -->
            <linux>
              <KEY>value</KEY>
            </linux>
            <!--
              Included only in OSX scripts
               
            -->
            <osx>
              <KEY>value</KEY>
            </osx>
            <!--
              Included in Windows scripts
               
            -->
            <windows>
              <KEY>value</KEY>
            </windows>
          </environmentVariables>

          <!--
            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>

          <!--
            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>

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

        <!--
          List of template files to be skipped.
          Value may be an exact match or a regex.
          
        -->
        <skipTemplates>
          <skipTemplate>README.md.tpl</skipTemplate>
        </skipTemplates>

        <!--
          Defines a list of additional files as artifacts.
          These files will be added to the assembled archive.
           
        -->
        <artifacts>
          <artifact>
            <path>path/to/file</path>
          </artifact>
          <artifact>
            <path>path/to/another_file</path>
            <transform>path/inside/archive</transform>
          </artifact>
          <artifact>
            <path>path/to/platform/specific/file</path>
            <platform>osx-x86_64</platform>
          </artifact>
        </artifacts>

        <!--
          Defines a list of additional files as globs.
          These files will be added to the assembled archive.
          
        -->
        <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 archive.
          
        -->
        <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.
        // Supported 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

        // The stereotype of this assembler.
        // Supported values are [`NONE`, `CLI`, `DESKTOP`, `WEB`, `MOBILE`].
        // Defaults to `#{project.stereotype}`.
        // 
        stereotype = 'CLI'

        // 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

        // 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.
          // Supported 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: <value>" of the RPM .spec).
          // If undefined, will use `#{project.license}`
          // 
          license = 'MIT'

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

          // Group value of the RPM <name>.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.
          // Supported 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.
          // Supported 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 {
          // 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'

          // Options to pass to the Java runtime
          // 
          jvmOptions {
            // Included in all scripts
            //  
            universal('-Dprop=value')
            // Included in all non Windows scripts
            //  
            unix('-Dprop=value')
            // Included in all non Windows (except OSX) scripts
            //  
            linux('-Dprop=value')
            // Included only in OSX scripts
            //  
            osx('-Dprop=value')
            // Included in Windows scripts
            //  
            windows('-Dprop=value')
          }

          // Environment variables used in launch scripts.
          // 
          environmentVariables {
            // Included in all scripts
            //  
            universal('KEY', 'value')
            // Included in all non Windows scripts
            //  
            unix('KEY', 'value')
            // Included in all non Windows (except OSX) scripts
            //  
            linux('KEY', 'value')
            // Included only in OSX scripts
            //  
            osx('KEY', 'value')
            // Included in Windows scripts
            //  
            windows('KEY', 'value')
          }

          // 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'

          // 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')
        }

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

        // List of template files to be skipped.
        // Value may be an exact match or a regex.
        // 
        skipTemplate('README.md.tpl')

        // Defines a list of additional files as artifacts.
        // These files will be added to the assembled archive.
        //  
        artifact {
          path = 'path/to/file'
        }
        artifact {
          path = 'path/to/another_file'
          transform = 'path/inside/archive'
        }
        artifact {
          path = 'path/to/platform/specific/file'
          platform = 'osx-x86_64'
        }

        // Defines a list of additional files as globs.
        // These files will be added to the assembled archive.
        // 
        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 archive.
        // 
        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')
        }
      }
    }
  }
}

Environment

When not explicitly set, the value of the following properties may be resolved from an environment variable or a system property as shown in the table. The system property takes precedence over the environment variable.

System Property Environment Variable

active

jreleaser.assemble.jpackge.${name}.active
jreleaser.assemble.jpackge.active

JRELEASER_ASSEMBLE_JPACKAGE_${name}_ACTIVE
JRELEASER_ASSEMBLE_JPACKAGE_ACTIVE

Substitute ${name} for the value of the named instance.

Space (' '), underscore (_), and dash (-) will be replaced by dot (.) to separate tokens in the System property. Space (' '), dash (-), and dot (.) will be replaced by underscore (_) to separate tokens in the environment variable, such that:

${name} System Property Environment Variable

foobar

foobar

FOOBAR

fooBar

foobar

FOOBAR

foo bar

foo.bar

FOO_BAR

foo-bar

foo.bar

FOO_BAR

foo_bar

foo.bar

FOO_BAR

foo.bar

foo.bar

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

Any additional files found in the template directories will be copied as is unless their filename ends with .tpl in which case Name Templates substitution will take place.

Skip Templates

You may skip any template files by defining a set of skip rules in the skipTemplates property. For example, you may use any of these expressions to skip a template named README.md.tpl:

  • README.md.tpl: matches the full template name

  • README.md: matches the transformed template name

  • README.*: matches using a regex

Additional Files

There are several ways to define additional files that may be handled by this assembler.

Templates

  • You may use Name Templates inside the files to be copied.

  • They retain directory structure that is, a template found at {templateDirectory}/foo.txt.tpl will be copied as foo.txt while a template such as {templateDirectory}/docs/bar.md.tpl will be copied to docs/bar.md.

FileSets

  • May use globs or regexes to define files to be included from a starting directory.

  • They retain directory structure.

  • May rename the target parent directory.

Files

  • May use globs or regexes to define files to be included from a starting directory.

  • They do not retain directory structure. Only filenames are copied.

Artifacts

  • They do not retain directory structure by default. An artifact with path set to bin/launcher.sh will be copied to launcher.sh.

  • May use the transform property to define the target path. An artifact with path set to bin/launcher.sh and transform set to bin/{{projectName}} will be copied to bin/app [assuming projectName resolves to app].

  • May use the platform property to filter files per matching platform. An artifact with platform set to windows-x86_64 will only be copied when the matching platform is compatible with windows-x86_64.

  • Artifacts without an explicit platform won’t be filtered.

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

  links:
    homepage: https://acme.com/app
  authors:
    - Duke
  license: Apache-2.0
  vendor: Kordamp
  java:
    mainClass: com.acme.Main
    groupId: com.acme
    artifactId: app
    version: 17
  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

  links:
    homepage: https://acme.com/app
  authors:
    - Duke
  license: Apache-2.0
  vendor: Kordamp
  java:
    mainClass: com.acme.Main
    groupId: com.acme
    artifactId: app
    version: 17
  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