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.
The following artifact extensions are supported by this packager:
- 
.zip
Distribution Support
| Distribution | Supported | 
|---|---|
| Configuring this packager automatically enables the Sdkman announcer. | 
| Publication of snapshots is not allowed. | 
Configuration
Legend:
- 
required 
- 
optional 
- 
may use environment variable 
- 
accepts Name Templates 
# 
packagers:
  # 
  sdkman:
    # Enables or disables Sdkman.
    # 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
    # Skip publication to remove services.
    # Defaults to `false`.
    # 
    skipPublishing: 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 `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 the Sdkman database.
    # If unspecified, will use `#{distribution.name}`.
    # 
    candidate: app
    # Sdkman command to use.
    # Supported values are [`MAJOR`, `MINOR`]
    # Defaults to `MAJOR`.
    # 
    command: MAJOR
    # The release notes URL to use.
    # Defaults to `#{release.${releaser}.releaseNotesUrl}`.
    #  
    releaseNotesUrl: https://host.com/{{projectName}}/{{tagName}}
    # The consumer key for publishing to Sdkman.
    #  
    consumerKey: __USE_ENVIRONMENT_VARIABLE__
    # The consumer token for publishing to Sdkman.
    #  
    consumerToken: __USE_ENVIRONMENT_VARIABLE__# 
[packagers.sdkman]
  # Enables or disables Sdkman.
  # 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
  # Skip publication to remove services.
  # Defaults to `false`.
  # 
  skipPublishing = 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 `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 #{distribution.name}.
  # 
  candidate = "app"
  # The release notes URL to use.
  # Defaults to `#{release.${releaser}.releaseNotesUrl}`.
  #  
  releaseNotesUrl = "https://host.com/{{projectName}}/{{tagName}}"
  # Sdkman command to use.
  # Supported values are [`MAJOR`, `MINOR`]
  # Defaults to `MAJOR`.
  # 
  command = "MAJOR"
  # The consumer key for publishing to Sdkman.
  #  
  consumerKey = "__USE_ENVIRONMENT_VARIABLE__"
  # The consumer token for publishing to Sdkman.
  #  
  consumerToken = "__USE_ENVIRONMENT_VARIABLE__"{
  // 
  "packagers": {
    // 
    "sdkman": {
      // Enables or disables Sdkman.
      // 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,
      // Skip publication to remove services.
      // Defaults to `false`.
      // 
      "skipPublishing": 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 `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",
      // The release notes URL to use.
      // Defaults to `#{release.${releaser}.releaseNotesUrl}`.
      //  
      "releaseNotesUrl": "https://host.com/{{projectName}}/{{tagName}}",
      // Sdkman command to use.
      // Supported values are [`MAJOR`, `MINOR`]
      // Defaults to `MAJOR`.
      // 
      "command": "MAJOR",
      // The consumer key for publishing to Sdkman.
      //  
      "consumerKey": "__USE_ENVIRONMENT_VARIABLE__",
      // The consumer token for publishing to Sdkman.
      //  
      "consumerToken": "__USE_ENVIRONMENT_VARIABLE__"
    }
  }
}<jreleaser>
  <!--
    
  -->
  <packagers>
    <!--
      
    -->
    <sdkman>
      <!--
        Enables or disables Sdkman.
        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>
      <!--
        Skip publication to remove services.
        Defaults to `false`.
        
      -->
      <skipPublishing>true</skipPublishing>
      <!--
        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 `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 #{distribution.name}.
        
      -->
      <candidate>app</candidate>
      <!--
        The release notes URL to use.
        Defaults to `#{release.${releaser}.releaseNotesUrl}`.
         
      -->
      <releaseNotesUrl>https://host.com/{{projectName}}/{{tagName}}</releaseNotesUrl>
      <!--
        Sdkman command to use.
        Supported values are [`MAJOR`, `MINOR`]
        Defaults to `MAJOR`.
        
      -->
      <command>MAJOR</command>
      <!--
        The consumer key for publishing to Sdkman.
         
      -->
      <consumerKey>__USE_ENVIRONMENT_VARIABLE__</consumerKey>
      <!--
        The consumer token for publishing to Sdkman.
         
      -->
      <consumerToken>__USE_ENVIRONMENT_VARIABLE__</consumerToken>
    </sdkman>
  </packagers>
</jreleaser>jreleaser {
  // 
  packagers {
    // 
    sdkman {
      // Enables or disables Sdkman.
      // 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
      // Skip publication to remove services.
      // Defaults to `false`.
      // 
      skipPublishing = 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 `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 #{distribution.name}.
      // 
      candidate = 'app'
      // The release notes URL to use.
      // Defaults to `#{release.${releaser}.releaseNotesUrl}`.
      //  
      releaseNotesUrl = 'https://host.com/{{projectName}}/{{tagName}}'
      // Sdkman command to use.
      // Supported values are [`MAJOR`, `MINOR`]
      // Defaults to `MAJOR`.
      // 
      command = 'MAJOR'
      // The consumer key for publishing to Sdkman.
      //  
      consumerKey = '__USE_ENVIRONMENT_VARIABLE__'
      // The consumer token for publishing to Sdkman.
      //  
      consumerToken = '__USE_ENVIRONMENT_VARIABLE__'
    }
  }
}| Candidate names must be unique! | 
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.
Inside packagers section
| System Property | Environment Variable | 
|---|---|
| active | |
| jreleaser.packagers.sdkman.active | JRELEASER_PACKAGERS_SDKMAN_ACTIVE | 
Inside distributions section
| System Property | Environment Variable | 
|---|---|
| active | |
| jreleaser.distributions.${name}.sdkman.active | JRELEASER_DISTRIBUTIONS_${name}_SDKMAN_ACTIVE | 
| consumerKey | |
| jreleaser.distributions.${name}.sdkman.consumer.key | JRELEASER_DISTRIBUTIONS_${name}_SDKMAN_CONSUMER_KEY | 
| consumerToken | |
| jreleaser.distributions.${name}.sdkman.consumer.token | JRELEASER_DISTRIBUTIONS_${name}_SDKMAN_CONSUMER_TOKEN | 
| 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 | 
 | 
 | 
| foo bar | 
 | 
 | 
| foo-bar | 
 | 
 | 
| foo_bar | 
 | 
 | 
| foo.bar | 
 | 
 | 
DownloadURL
JReleaser follows these rules to find the download URL to use for a given artifact:
- 
if artifact.extraProperties.sdkmanDownloadUrlexists, use it.
- 
if artifact.extraProperties.downloadUrlexists, use it.
- 
if explicit downloadUrlis set onsdkman, use it.
- 
if distribution.extraProperties.sdkmanDownloadUrlexists, use it.
- 
if distribution.extraProperties.downloadUrlexists, use it.
- 
if releaser.${release}.skipReleaseisfalsethen use the releaser’sdownloadUrl.
- 
if releaser.${release}.skipReleaseistruethen look for a matching uploader given an extraProperty nameddownloadUrlFromonartifact,distribution, `sdkman(in that order). The value must be<uploaderType>:<uploaderName>such as "artifactory:app" or "s3:uploads".
- 
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.
Skip Artifacts
You may mark artifacts to be skipped for this packager by adding an extra property name skipSdkman set to true.
Requirements
This packager has the following requirements:
- 
Only zipartifacts are supported.
- 
The default platform is set to UNIVERSALif the artifact did not define a value for itsplatformfield.
- 
If there’s more than one artifact then each artifact requires distinct platformvalues, otherwise the latest artifact will override any previous matches by platform.
- 
You may explicitly skip an artifact by defining an extra property named skipSdkmanwith atruevalue.
- 
Publishing will be skipped if no suitable artifacts are found. 
Supported platform values are:
- 
mac,osx.
- 
win,windows.
- 
linux.
Command
You may set the command property to either MAJOR or MINOR. A MINOR release publishes a new version and posts an
announcement. A MAJOR release performs the same actions as MINOR plus setting the recently published version as default.
Thus, the only difference between MINOR and MAJOR is setting a given version as default.