Sdkman

Publishes a distribution to Sdkman. Please follow the instructions at https://sdkman.io/vendors to register your project as a candidate and obtain publishing credentials.

Configuring this packager automatically enables the Sdkman announcer.
Snapshots are not supported.

Legend:

  • required

  • optional

  • may use environment variable

  • accepts Name Templates

  • YAML

  • TOML

  • JSON

  • Maven

  • Gradle

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

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

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

    # Defines the connection timeout in seconds.
    # Defaults to `20`.
    # 
    connectTimeout: 20

    # Defines the read timeout in seconds.
    # Defaults to `60`.
    # 
    readTimeout: 60

    # The name of the candidate registered in thew Sdkman database.
    # If unspecified, will use ${distribution.name}.
    # 
    candidate: app

    # Sdkman command to use.
    # Valid values are [`MAJOR`, `MINOR`]
    # Defaults to `MAJOR`.
    # 
    command: MAJOR

    # The release notes URL to use.
    # Defaults to `${release..releaseNotesUrl}.
    #  
    releaseNotesUrl: https://host.com/{{projectName}}/{{tagName}}

    # The consumer key for publishing to Sdkman.
    # If left unspecified, the `JRELEASER_SDKMAN_CONSUMER_KEY`
    # environment variable must be defined.
    #  
    consumerKey: __DO_NOT_SET_HERE__

    # The consumer token for publishing to Sdkman.
    # If left unspecified, the `JRELEASER_SDKMAN_CONSUMER_TOKEN`
    # environment variable must be defined.
    #  
    consumerToken: __DO_NOT_SET_HERE__
# 
[packagers.sdkman]
  # Enables or disables Sdkman.
  # Valid values are [`NEVER`, `ALWAYS`, `RELEASE`, `SNAPSHOT`].
  # Defaults to `NEVER`.
  # 
  active = "ALWAYS"

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

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

  # Defines the connection timeout in seconds.
  # Defaults to `20`.
  # 
  connectTimeout = 20

  # Defines the read timeout in seconds.
  # Defaults to `60`.
  # 
  readTimeout = 60

  # The name of the candidate registered in thew Sdkman database.
  # If unspecified, will use ${project.name}.
  # 
  candidate = "app"

  # The release notes URL to use.
  # Defaults to `${release..releaseNotesUrl}.
  #  
  releaseNotesUrl = "https://host.com/{{projectName}}/{{tagName}}"

  # Sdkman command to use.
  # Valid values are [`MAJOR`, `MINOR`]
  # Defaults to `MAJOR`.
  # 
  command = "MAJOR"

  # The consumer key for publishing to Sdkman.
  # If left unspecified, the `JRELEASER_SDKMAN_CONSUMER_KEY`
  # environment variable must be defined.
  #  
  consumerKey = "__DO_NOT_SET_HERE__"

  # The consumer token for publishing to Sdkman.
  # If left unspecified, the `JRELEASER_SDKMAN_CONSUMER_TOKEN`
  # environment variable must be defined.
  #  
  consumerToken = "__DO_NOT_SET_HERE__"
{
  // 
  "packagers": {
    // 
    "sdkman": {
      // Enables or disables Sdkman.
      // Valid values are [`NEVER`, `ALWAYS`, `RELEASE`, `SNAPSHOT`].
      // Defaults to `NEVER`.
      // 
      "active": "ALWAYS",

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

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

      // Defines the connection timeout in seconds.
      // Defaults to `20`.
      // 
      "connectTimeout": 20,

      // Defines the read timeout in seconds.
      // Defaults to `60`.
      // 
      "readTimeout": 60,

      // The name of the candidate registered in thew Sdkman database.
      // If unspecified, will use ${project.name}.
      // 
      "candidate": "app",

      // The release notes URL to use.
      // Defaults to `${release..releaseNotesUrl}.
      //  
      "releaseNotesUrl": "https://host.com/{{projectName}}/{{tagName}}",

      // Sdkman command to use.
      // Valid values are [`MAJOR`, `MINOR`]
      // Defaults to `MAJOR`.
      // 
      "command": "MAJOR",

      // The consumer key for publishing to Sdkman.
      // If left unspecified, the `JRELEASER_SDKMAN_CONSUMER_KEY`
      // environment variable must be defined.
      //  
      "consumerKey": "__DO_NOT_SET_HERE__",

      // The consumer token for publishing to Sdkman.
      // If left unspecified, the `JRELEASER_SDKMAN_CONSUMER_TOKEN`
      // environment variable must be defined.
      //  
      "consumerToken": "__DO_NOT_SET_HERE__"
    }
  }
}
<jreleaser>
  <!--
    
  -->
  <packagers>
    <!--
      
    -->
    <sdkman>
      <!--
        Enables or disables Sdkman.
        Valid 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>

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

      <!--
        Defines the connection timeout in seconds.
        Defaults to `20`.
        
      -->
      <connectTimeout>20</connectTimeout>

      <!--
        Defines the read timeout in seconds.
        Defaults to `60`.
        
      -->
      <readTimeout>60</readTimeout>

      <!--
        The name of the candidate registered in thew Sdkman database.
        If unspecified, will use ${project.name}.
        
      -->
      <candidate>app</candidate>

      <!--
        The release notes URL to use.
        Defaults to `${release.<git>.releaseNotesUrl}.
         
      -->
      <releaseNotesUrl>https://host.com/{{projectName}}/{{tagName}}</releaseNotesUrl>

      <!--
        Sdkman command to use.
        Valid values are [`MAJOR`, `MINOR`]
        Defaults to `MAJOR`.
        
      -->
      <command>MAJOR</command>

      <!--
        The consumer key for publishing to Sdkman.
        If left unspecified, the `JRELEASER_SDKMAN_CONSUMER_KEY`
        environment variable must be defined.
         
      -->
      <consumerKey>__DO_NOT_SET_HERE__</consumerKey>

      <!--
        The consumer token for publishing to Sdkman.
        If left unspecified, the `JRELEASER_SDKMAN_CONSUMER_TOKEN`
        environment variable must be defined.
         
      -->
      <consumerToken>__DO_NOT_SET_HERE__</consumerToken>
    </sdkman>
  </packagers>
</jreleaser>
jreleaser {
  // 
  packagers {
    // 
    sdkman {
      // Enables or disables Sdkman.
      // Valid values are [`NEVER`, `ALWAYS`, `RELEASE`, `SNAPSHOT`].
      // Defaults to `NEVER`.
      // 
      active = 'ALWAYS'

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

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

      // Defines the connection timeout in seconds.
      // Defaults to `20`.
      // 
      connectTimeout = 20

      // Defines the read timeout in seconds.
      // Defaults to `60`.
      // 
      readTimeout = 60

      // The name of the candidate registered in thew Sdkman database.
      // If unspecified, will use ${project.name}.
      // 
      candidate = 'app'

      // The release notes URL to use.
      // Defaults to `${release..releaseNotesUrl}.
      //  
      releaseNotesUrl = 'https://host.com/{{projectName}}/{{tagName}}'

      // Sdkman command to use.
      // Valid values are [`MAJOR`, `MINOR`]
      // Defaults to `MAJOR`.
      // 
      command = 'MAJOR'

      // The consumer key for publishing to Sdkman.
      // If left unspecified, the `JRELEASER_SDKMAN_CONSUMER_KEY`
      // environment variable must be defined.
      //  
      consumerKey = '__DO_NOT_SET_HERE__'

      // The consumer token for publishing to Sdkman.
      // If left unspecified, the `JRELEASER_SDKMAN_CONSUMER_TOKEN`
      // environment variable must be defined.
      //  
      consumerToken = '__DO_NOT_SET_HERE__'
    }
  }
}
The catalog token environment variable must match with the chosen Release service, that is, it must be one of [JRELEASER_JBANG_GITHUB_TOKEN, JRELEASER_JBANG_GITLAB_TOKEN, JRELEASER_JBANG_GITEA_TOKEN].
Candidate names must be unique!

Requirements

This packager has the following requirements:

  • Only zip artifacts are supported.

  • The default platform is set to UNIVERSAL if the artifact did not define a value for its platform field.

  • If there’s more than one artifact then each artifact requires distinct platform values, otherwise the latest artifact will override any previous matches by platform.

  • You may explicitly skip an artifact by defining an extra property named skipSdkman with a true value.

  • Publishing will be skipped if no suitable artifacts are found.

Supported platform values are:

  • mac, osx.

  • win, windows.

  • linux.