Skip to content

kordamp/maven-sdkman-publisher

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Maven SDKman Publisher

Automated publishing of Apache Maven releases to SDKman.

Background

Publishing new Apache Maven releases to SDKman currently depends on a single person manually triggering an API call. This repository provides a GitHub Actions workflow to make the process more resilient, accessible, and auditable.

See Discussion #156 for the full proposal.

How It Works

The publish workflow derives a download URL from the version number, verifies the archive exists on repo.maven.apache.org, then calls the SDKman vendor API to register the release. It can optionally set the version as the SDKman default.

There are two ways to trigger a publication:

  • Workflow dispatch — maintainers trigger it manually via the GitHub Actions UI with a version input
  • PR-based — contributors update versions/maven.json in a PR; a verification workflow validates the version on the PR, and merging to main triggers the publication

Both paths use the official sdkman-release-action and sdkman-default-action.

Prerequisites

The following repository secrets must be configured:

  • SDKMAN_CONSUMER_KEY — your SDKman vendor API consumer key
  • SDKMAN_CONSUMER_TOKEN — your SDKman vendor API consumer token

Usage

Option 1: Manual Workflow Dispatch

  1. Go to ActionsPublish Maven to SDKman
  2. Click Run workflow
  3. Enter the Maven version (e.g., 4.0.0)
  4. Choose whether to set it as the SDKman default
  5. Click Run workflow

Option 2: PR-Based Publishing

  1. Fork this repository (or create a branch)
  2. Edit versions/maven.json with the new version:
    {
      "version": "4.0.0",
      "make_default": true
    }
  3. Open a pull request — CI automatically verifies the version format and download URL
  4. A maintainer reviews and merges — the publish workflow triggers automatically

Download URL Construction

The download URL is derived automatically from the version:

https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/{version}/apache-maven-{version}-bin.zip

The workflow verifies the URL exists before publishing to SDKman.

Open Questions

  • Multiple versions in parallel: Currently, the version file holds a single version. If Maven 3 and Maven 4 need to be published independently, separate branches (e.g., maven-3, maven-4) could each maintain their own versions/maven.json. The manual workflow dispatch already supports publishing any version independently.

License

This project is licensed under the Apache License 2.0.

About

Automated publishing of Apache Maven releases to SDKman

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors