Scoop

JReleaser can generate and publish a Scoop App Manifest into a repository that you have access to.

The scoop section specifies how the manifest should be created.

The following artifact extensions are supported by this packager:

  • .jar

  • .zip

  • .msi

Publication of snapshots is not allowed.

Legend:

  • required

  • optional

  • may use environment variable

  • accepts Name Templates

  • YAML

  • TOML

  • JSON

  • Maven

  • Gradle

# 
packagers:
  # 
  scoop:
    # Enables or disables Scoop.
    # Supported values are [`NEVER`, `ALWAYS`, `RELEASE`, `SNAPSHOT`].
    # Defaults to `NEVER`.
    # 
    active: ALWAYS

    # Let the release continue if the packager fails.
    # Defaults to `false`.
    # 
    continueOnError: true

    # Custom download URL.
    #  
    downloadUrl: https://my.server.com/{{projectName}}/{{tagName}}/{{artifactFile}}

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

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

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

    # Git author used to commit to the repository.
    # 
    commitAuthor:
      # Name used when authoring commits.
      # Defaults to `jreleaserbot`.
      # 
      name: jreleaserbot

      # E-mail used when authoring commits.
      # Defaults to `jreleaser@kordamp.org`.
      # 
      email: jreleaser@kordamp.org

    # Git repository to push the manifest to.
    # Defaults are shown.
    # 
    bucket:
      # Enables or disables the bucket.
      # Supported values are [`NEVER`, `ALWAYS`, `RELEASE`, `SNAPSHOT`].
      # Defaults to `RELEASE`.
      # 
      active: ALWAYS


      # The owner of the bucket.
      # Defaults to the same owner as the release repository.
      # 
      owner: duke

      # The name of the bucket.
      # Defaults to `scoop-duke`.
      # 
      name: scoop-duke

      # The tag associated with the manifest.
      # If left unspecified, will use `{{tagName}}`.
      #  
      tagName: '{{distributionName}} {{tagName}}'

      # The target branch to use.
      # May define a `JRELEASER_SCOOP_${GIT}_BRANCH` environment variable instead.
      # Defaults to the branch pointed by HEAD.
      #  
      branch: HEAD

      # Username used for authoring commits. Must have write access to the bucket.
      # If left unspecified, the `JRELEASER_SCOOP_${GIT}_USERNAME`
      # environment variable must be defined.
      # Defaults to the same username as the release repository.
      #  
      username: duke

      # Password or OAuth token with write access to the bucket.
      # If left unspecified, the `JRELEASER_SCOOP_${GIT}_TOKEN`
      # environment variable must be defined.
      #  
      token: __DO_NOT_SET_HERE__

      # Message when committing to the bucket.
      # If left unspecified, `{{distributionName}} {{tagName}}` will be used.
      #  
      commitMessage: '{{distributionName}} {{tagName}}'

    # Name of the Scoop package.
    # Defaults to `${distribution.executable}`.
    # 
    packageName: app

    # URL used to check the latest version.
    # Defaults to the releaser's `latestReleaseUrl`.
    #  
    checkverUrl: https://host/path

    # URL used to download a new version.
    # Defaults to the releaser's `downloadUrl`.
    #  
    autoupdateUrl: https://host/path
# 
[packagers.scoop]
  # Enables or disables Scoop.
  # Supported values are [`NEVER`, `ALWAYS`, `RELEASE`, `SNAPSHOT`].
  # Defaults to `NEVER`.
  # 
  active = "ALWAYS"

  # Let the release continue if the packager fails.
  # Defaults to `false`.
  # 
  continueOnError = true

  # Custom download URL.
  #  
  downloadUrl = "https://my.server.com/{{projectName}}/{{tagName}}/{{artifactFile}}"

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

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

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

  # Git author used to commit to the repository.

  # Name used when authoring commits.
  # Defaults to `jreleaserbot`.
  # 
  commitAuthor.name = "jreleaserbot"

  # E-mail used when authoring commits.
  # Defaults to `jreleaser@kordamp.org`.
  # 
  commitAuthor.email = "jreleaser@kordamp.org"

  # Git repository to push the manifest to.
  # Defaults are shown.

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


  # The owner of the bucket.
  # Defaults to the same owner as the release repository.
  # 
  bucket.owner = "duke"

  # The name of the bucket.
  # Defaults to `scoop-duke`.
  # 
  bucket.name = "scoop-duke"

  # The tag associated with the manifest.
  # If left unspecified, will use `{{tagName}}`.
  #  
  bucket.tagName = "{{distributionName}} {{tagName}}"

  # The target branch to use.
  # May define a `JRELEASER_SCOOP_${GIT}_BRANCH` environment variable instead.
  # Defaults to the branch pointed by HEAD.
  #  
  bucket.branch = "HEAD"

  # Username used for authoring commits. Must have write access to the bucket.
  # If left unspecified, the `JRELEASER_SCOOP_${GIT}_USERNAME`
  # environment variable must be defined.
  # Defaults to the same username as the release repository.
  #  
  bucket.username = "duke"

  # Password or OAuth token with write access to the bucket.
  # If left unspecified, the `JRELEASER_SCOOP_${GIT}_TOKEN`
  # environment variable must be defined.
  #  
  bucket.token = "__DO_NOT_SET_HERE__"

  # Message when committing to the bucket.
  # If left unspecified, `{{distributionName}} {{tagName}}` will be used.
  #  
  bucket.commitMessage = "{{distributionName}} {{tagName}}"

  # Name of the Scoop package.
  # Defaults to `${distribution.executable}`.
  # 
  packageName = "app"

  # URL used to check the latest version.
  # Defaults to the releaser's `latestReleaseUrl`.
  #  
  checkverUrl = "https://host/path"

  # URL used to download a new version.
  # Defaults to the releaser's `downloadUrl`.
  #  
  autoupdateUrl = "https://host/path"
{
  // 
  "packagers": {
    // 
    "scoop": {
      // Enables or disables Scoop.
      // Supported values are [`NEVER`, `ALWAYS`, `RELEASE`, `SNAPSHOT`].
      // Defaults to `NEVER`.
      // 
      "active": "ALWAYS",

      // Let the release continue if the packager fails.
      // Defaults to `false`.
      // 
      "continueOnError": true,

      // Custom download URL.
      //  
      "downloadUrl": "https://my.server.com/{{projectName}}/{{tagName}}/{{artifactFile}}",

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

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

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

      // Git author used to commit to the repository.
      // 
      "commitAuthor": {
        // Name used when authoring commits.
        // Defaults to `jreleaserbot`.
        // 
        "name": "jreleaserbot",

        // E-mail used when authoring commits.
        // Defaults to `jreleaser@kordamp.org`.
        // 
        "email": "jreleaser@kordamp.org"
      },

      // Git repository to push the manifest to.
      // Defaults are shown.
      // 
      "bucket": {
        // Enables or disables the bucket.
        // Supported values are [`NEVER`, `ALWAYS`, `RELEASE`, `SNAPSHOT`].
        // Defaults to `RELEASE`.
        // 
        "active": "ALWAYS",


        // The owner of the bucket.
        // Defaults to the same owner as the release repository.
        // 
        "owner": "duke",

        // The name of the bucket.
        // Defaults to `scoop-duke`.
        // 
        "name": "scoop-duke",

        // The tag associated with the manifest.
        // If left unspecified, will use `{{tagName}}`.
        //  
        "tagName": "{{distributionName}} {{tagName}}",

        // The target branch to use.
        // May define a `JRELEASER_SCOOP_${GIT}_BRANCH` environment variable instead.
        // Defaults to the branch pointed by HEAD.
        //  
        "branch": "HEAD",

        // Username used for authoring commits. Must have write access to the bucket.
        // If left unspecified, the `JRELEASER_SCOOP_${GIT}_USERNAME`
        // environment variable must be defined.
        // Defaults to the same username as the release repository.
        //  
        "username": "duke",

        // Password or OAuth token with write access to the bucket.
        // If left unspecified, the `JRELEASER_SCOOP_${GIT}_TOKEN`
        // environment variable must be defined.
        //  
        "token": "__DO_NOT_SET_HERE__",

        // Message when committing to the bucket.
        // If left unspecified, `{{distributionName}} {{tagName}}` will be used.
        //  
        "commitMessage": "{{distributionName}} {{tagName}}"
      },

      // Name of the Scoop package.
      // Defaults to `${distribution.executable}`.
      // 
      "packageName": "app",

      // URL used to check the latest version.
      // Defaults to the releaser's `latestReleaseUrl`.
      //  
      "checkverUrl": "https://host/path",

      // URL used to download a new version.
      // Defaults to the releaser's `downloadUrl`.
      //  
      "autoupdateUrl": "https://host/path"
    }
  }
}
<jreleaser>
  <!--
    
  -->
  <packagers>
    <!--
      
    -->
    <scoop>
      <!--
        Enables or disables Scoop.
        Supported values are [`NEVER`, `ALWAYS`, `RELEASE`, `SNAPSHOT`].
        Defaults to `NEVER`.
        
      -->
      <active>ALWAYS</active>

      <!--
        Let the release continue if the packager fails.
        Defaults to `false`.
        
      -->
      <continueOnError>true</continueOnError>

      <!--
        Custom download URL.
         
      -->
      <downloadUrl>https://my.server.com/{{projectName}}/{{tagName}}/{{artifactFile}}</downloadUrl>

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

      <!--
        Directory with file templates used to prepare the Scoop distribution.
        Defaults to `src/jreleaser/distributions/${distribution.name}/scoop`.
        If specified, path must exist.
        
      -->
      <templateDirectory>path/to/scoop/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>

      <!--
        Git author used to commit to the repository.
        
      -->
      <commitAuthor>

        <!--
           Name used when authoring commits.
          Defaults to `jreleaserbot`.
          
        -->
        <name>jreleaserbot</name>

        <!--
          E-mail used when authoring commits.
          Defaults to `jreleaser@kordamp.org`.
          
        -->
        <email>jreleaser@kordamp.org</email>
      </commitAuthor>

      <!--
        Git repository to push the manifest to.
        Defaults are shown.
        
      -->
      <bucket>
        <!--
          Enables or disables the bucket.
          Supported values are [`NEVER`, `ALWAYS`, `RELEASE`, `SNAPSHOT`].
          Defaults to `RELEASE`.
          
        -->
        <active>ALWAYS</active>


        <!--
          The owner of the bucket.
          Defaults to the same owner as the release repository.
          
        -->
        <owner>duke</owner>

        <!--
          The name of the bucket.
          Defaults to `scoop-duke`.
          
        -->
        <name>scoop-duke</name>

        <!--
          The tag associated with the manifest.
          If left unspecified, will use `{{tagName}}`.
           
        -->
        <tagName>{{distributionName}} {{tagName}}</tagName>

        <!--
          The target branch to use.
          May define a `JRELEASER_SCOOP_${GIT}_BRANCH`` environment variable instead.
          Defaults to the branch pointed by HEAD.
           
        -->
        <branch>HEAD</branch>

        <!--
          Username used for authoring commits. Must have write access to the bucket.
          If left unspecified, the `JRELEASER_SCOOP_${GIT}_USERNAME`
          environment variable must be defined.
          Defaults to the same username as the release repository.
           
        -->
        <username>duke</username>

        <!--
          Password or OAuth token with write access to the bucket.
          If left unspecified, the `JRELEASER_SCOOP_${GIT}_TOKEN`
          environment variable must be defined.
           
        -->
        <token>__DO_NOT_SET_HERE__</token>

        <!--
          Message when committing to the bucket.
          If left unspecified, `{{distributionName}} {{tagName}}` will be used.
           
        -->
        <commitMessage>{{distributionName}} {{tagName}}</commitMessage>
      </bucket>

      <!--
        Name of the Scoop package.
        Defaults to `${distribution.executable}`.
        
      -->
      <packageName>app</packageName>

      <!--
        URL used to check the latest version.
        Defaults to the releaser's `latestReleaseUrl`.
         
      -->
      <checkverUrl>https://host/path</checkverUrl>

      <!--
        URL used to download a new version.
        Defaults to the releaser's `downloadUrl`.
         
      -->
      <autoupdateUrl>https://host/path</autoupdateUrl>
    </scoop>
  </packagers>
</jreleaser>
jreleaser {
  // 
  packagers {
    // 
    scoop {
      // Enables or disables Scoop.
      // Supported values are [`NEVER`, `ALWAYS`, `RELEASE`, `SNAPSHOT`].
      // Defaults to `NEVER`.
      // 
      active = 'ALWAYS'

      // Let the release continue if the packager fails.
      // Defaults to `false`.
      // 
      continueOnError = true

      // Custom download URL.
      //  
      downloadUrl = 'https://my.server.com/{{projectName}}/{{tagName}}/{{artifactFile}}'

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

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

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

      // Git author used to commit to the repository.
      // 
      commitAuthor {
        // Name used when authoring commits.
        // Defaults to `jreleaserbot`.
        // 
        name = 'jreleaserbot'

        // E-mail used when authoring commits.
        // Defaults to `jreleaser@kordamp.org`.
        // 
        email = 'jreleaser@kordamp.org'
      }

      // Git repository to push the manifest to.
      // Defaults are shown.
      // 
      bucket {
        // Enables or disables the bucket.
        // Supported values are [`NEVER`, `ALWAYS`, `RELEASE`, `SNAPSHOT`].
        // Defaults to `RELEASE`.
        // 
        active = 'ALWAYS'


        // The owner of the bucket.
        // Defaults to the same owner as the release repository.
        // 
        repoOwner = 'duke'

        // The name of the bucket.
        // Defaults to `scoop-duke`.
        // 
        name = 'scoop-duke'

        // The tag associated with the manifest.
        // If left unspecified, will use `{{tagName}}`.
        //  
        tagName = '{{distributionName}} {{tagName}}'

        // The target branch to use.
        // May define a `JRELEASER_BRANCH` environment variable instead.
        // Defaults to the branch pointed by HEAD.
        //  
        branch = 'HEAD'

        // Username used for authoring commits. Must have write access to the bucket.
        // If left unspecified, the `JRELEASER_SCOOP_${GIT}_USERNAME`
        // environment variable must be defined.
        // Defaults to the same username as the release repository.
        //  
        username = 'duke'

        // Password or OAuth token with write access to the bucket.
        // If left unspecified, the `JRELEASER_SCOOP_${GIT}_TOKEN`
        // environment variable must be defined.
        //  
        token = '__DO_NOT_SET_HERE__'

        # Message when committing to the bucket.
        # If left unspecified, `{{distributionName}} {{tagName}}` will be used.
        #  
        commitMessage = '{{distributionName}} {{tagName}}'
      }

      // Name of the Scoop package.
      // Defaults to `${distribution.executable}`.
      // 
      packageName = 'app'

      // URL used to check the latest version.
      // Defaults to the releaser's `latestReleaseUrl`.
      //  
      checkverUrl = 'https://host/path'

      // URL used to download a new version.
      // Defaults to the releaser's `downloadUrl`.
      //  
      autoupdateUrl = 'https://host/path'
    }
  }
}

Tokens

The bucket token environment variable must match with the chosen Release service that is, it must be one of:
  • JRELEASER_SCOOP_GITHUB_TOKEN

  • JRELEASER_SCOOP_GITLAB_TOKEN

  • JRELEASER_SCOOP_GITEA_TOKEN

  • JRELEASER_SCOOP_CODEBERG_TOKEN

If a matching token is not found then the releaser’s token will be used instead:

  • JRELEASER_GITHUB_TOKEN

  • JRELEASER_GITLAB_TOKEN

  • JRELEASER_GITEA_TOKEN

  • JRELEASER_CODEBERG_TOKEN

On GitHub, you can’t use the default secrets.GITHUB_TOKEN as this token only works for the repository that’s running the workflow. You must configure a Personal Access Token instead.

DownloadURL

JReleaser follows these rules to find the download URL to use for a given artifact:

  1. if artifact.extraProperties.scoopDownloadUrl exists, use it.

  2. if artifact.extraProperties.downloadUrl exists, use it.

  3. if explicit downloadUrl is set on scoop, use it.

  4. if distribution.extraProperties.scoopDownloadUrl exists, use it.

  5. if distribution.extraProperties.downloadUrl exists, use it.

  6. if releaser.${git}.skipRelease is false then use the releaser’s downloadUrl.

  7. if releaser.${git}.skipRelease is true then look for a matching uploader given an extraProperty named downloadUrlFrom on artifact, distribution, `scoop (in that order). The value must be <uploaderType>:<uploaderName> such as "artifactory:app" or "s3:uploads".

  8. fail if no suitable URL is found.

With no extra configuration from your side rule 6. will be chosen which is the suitable default that most projects need.

Example

Assuming the current version is 1.2.3, and a distribution named app, the above configuration will generate a manifest.json formula in the duke/scoop-duke repository:

{
  "homepage": "https://acme.com/app",
  "description": "Sample app",
  "version": "1.2.3",
  "license": "Apache-2.0",
  "url": "https://github.com/duke/app/releases/download/v1.2.3/app-1.2.3.zip",
  "hash": "sha256:812121a64bbd3f49286f7b0be3c9209068f71fcf9541f313708979602e8de466",
  "extract_dir": "app-1.2.3",
  "env_add_path": "bin",
  "suggest": {
    "JDK": [
      "java/oraclejdk",
      "java/openjdk"
    ]
  },
  "checkver": {
    "url": "https://github.com/duke/app/releases/latest",
    "re": "v([\\d.]+).zip"
  },
  "autoupdate": {
    "url": "https://github.com/duke/app/releases/download/v1.2.3/app-$version.zip",
    "extract_dir": "app-$version",
    "hash": {
      "url": "$url.sha256"
    }
  }
}

Your users can then install your app by doing:

scoop bucket add duke https://github.com/duke/scoop-duke.git
scoop install app
GitLab does not yet offer an URL that resolves to a latest release. You may need to adapt the value of checkverUrl or update the tool template by removing that section. Keep an eye on https://gitlab.com/gitlab-org/gitlab/-/issues/16821.

Skip Artifacts

If there is more than one matching artifact in a given distribution you may add a skipScoop extra property to the target artifact to mark it as skipped for packaging with Scoop.

Templates

The default location for templates is:

src/jreleaser/distributions/<distribution-name>/scoop

The following list shows the filenames that may be used to override default templates:

  • manifest.json.tpl

  • README.md.tpl

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.

Templates may be initialized using the template command

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