Artifacts & Globs

Artifacts are at the heart of a release; they define files that may be:

  • added to a Git release.

  • prepared, packaged, and published using a packager.

Artifacts refer to a specific file as they have a single path property. Globs on the other hand refer to a collection of files.


Artifacts have the following properties:

  • path. Defines the location of the file. Path may be relative or absolute. We recomend defining paths that are relative to the basedir as much as possible, as that simplifies the setup on CI. Its value may use Name Templates. This property is required.

  • transform. Sometimes the source path does not have the exact name you’d looking for. You may apply a name transformation using this property. Its value may use Name Templates. This property is optional.

  • platform. Defines the OS specific platform for this file. Some assemblers and packagers require that artifacts define a platform.

  • extraPproperties. Defines key/value pairs of metadata that’s related to the artifact.

The value of platform is dictated by the normalized values detected by os-maven-plugin. You may use the plain platform value or append a arch classifier. The following values are currently recognized:


aix, hpux, os400, linux, linux_musl, osx, freebsd, openbsd, netbsd, sunos, windows, zos.


x86_64, x86_32, itanium_64, itanium_32, sparc_32, sparc_64, arm_32, aarch_64, mips_32, mipsel_32, mips_64, mipsel_64, ppc_32, ppcle_32, ppc_64, ppcle_64, s390_32, s390_64, riscv


  • osx

  • osx-arm

  • windows

  • linux

  • linux-x86_64

Use linux_musl for artifacts that target Alpine Linux.

Globs have the following properties:

  • directory. Defines the starting point when searching for files.

  • include. Defines a file name pattern. Matches will be included in the final collection.

  • exclude. Defines a file name pattern. Matches will be excluded from the final collection.

  • recursive. Whether to search recursively or not.

The values of directory, include, and exclude are optional but at least one of them has to be specified.

Both include and exclude accept glob or regex patterns by using glob: and regex: prefixes accordingly. If no prefix is specified then glob: will be used.



Generating cross-platform JLink images require that each target JDK define a value for its corresponding platform. Target JDKs are of type artifact.

  • YAML

  • TOML

  • JSON

  • Maven

  • Gradle

      active: always
        path: '{{oracleJdks}}/jdk-16_osx-x64/Contents/Home'
        platform: osx
        - path: '{{oracleJdks}}/jdk-16_osx-x64/Contents/Home'
          platform: osx
        - path: '{{oracleJdks}}/jdk-16_linux-x64'
          platform: linux
        - path: '{{oracleJdks}}/jdk-16_windows-x64'
          platform: windows
        path: 'target/{{distributionName}}-{{projectVersion}}.jar'
  active = "ALWAYS"
  mainJar = { path = "target/{{distributionName}}-{{projectVersion}}.jar" }
  jdk = { path = "{{oracleJdks}}/jdk-16_osx-x64/Contents/Home", platform = "osx" }
    path = "{{oracleJdks}}/jdk-16_osx-x64/Contents/Home"
    platform = "osx"
    path = "{{oracleJdks}}/jdk-16_linux-x64"
    platform = "linux"
    path = "{{oracleJdks}}/jdk-16_windows-x64"
    platform = "windows"
  "assemble": {
    "jlinks": {
      "app": {
        "active": "ALWAYS",
        "mainJar": {
          "path": "target/{{distributionName}}-{{projectVersion}}.jar"
        "jdk": {
          "path": "{{oracleJdks}}/jdk-16_osx-x64/Contents/Home",
          "platform": "osx"
        "targetJdks": [
            "path": "{{oracleJdks}}/jdk-16_osx-x64/Contents/Home",
            "platform": "osx"
            "path": "{{oracleJdks}}/jdk-16_linux-x64",
            "platform": "linux"
            "path": "{{oracleJdks}}/jdk-16_windows-x64",
            "platform": "windows"
jreleaser {
  assemble {
    jlinks {
      app {
        active = 'ALWAYS'
        mainJar {
          path = 'target/{{distributionName}}-{{projectVersion}}.jar'
        jdk {
          path = '{{oracleJdks}}/jdk-16_osx-x64/Contents/Home'
          platform = 'osx'
        targetJdk {
          path = '{{oracleJdks}}/jdk-16_osx-x64/Contents/Home'
          platform = 'osx'
        targetJdk {
          path = '{{oracleJdks}}/jdk-16_linux-x64'
          platform = 'linux'
        targetJdk {
          path = '{{oracleJdks}}/jdk-16_windows-x64'
          platform = 'windows'


JReleaser itself uses the transform property to rename its artifacts depending on the type of release.

      - path: apps/{{distributionName}}/build/distributions/{{distributionName}}-{{projectVersion}}.zip
        transform: '{{distributionName}}/{{distributionName}}-{{projectEffectiveVersion}}.zip'

      - path: plugins/{{distributionName}}/build/distributions/{{distributionName}}-{{projectVersion}}.zip
        transform: '{{distributionName}}/{{distributionName}}-{{projectEffectiveVersion}}.zip'

    type: SINGLE_JAR
      - path: apps/jreleaser-tool-provider/build/libs/jreleaser-tool-provider-{{projectVersion}}.jar
        transform: 'jreleaser-tool-provider/jreleaser-tool-provider-{{projectEffectiveVersion}}.jar'

Artifacts point to these files when the project version is snapshot:

└── jreleaser
    └── artifacts
        ├── jreleaser
        │   └──
        ├── jreleaser-ant-tasks
        │   └──
        └── jreleaser-tool-provider
            └── jreleaser-tool-provider-early-access.jar

Whereas the following files will be used when the project is release:

├── apps
│    ├── jreleaser
│    │   └── build
│    │       └── distributions
│    │           └──
│    └── jreleaser-tool-provider
│        └── build
│            └── libs
│                └── jreleaser-tool-provider-0.4.0.jar
└── plugins
    └── jreleaser-ant-tasks
        └── build
            └── distributions