Skip to content

Fix 4.x release: Migrate to Maven Central Publishing API - #1699

Closed
ricardozanini wants to merge 1 commit into
open-workflow-specification:4.xfrom
ricardozanini:fix-ci-release-4.x-maven-central
Closed

ricardozanini wants to merge 1 commit into
open-workflow-specification:4.xfrom
ricardozanini:fix-ci-release-4.x-maven-central

Conversation

@ricardozanini

Copy link
Copy Markdown
Collaborator

Resolves the 402 Payment Required error when releasing from the 4.x branch.

Problem

The 4.x branch was still using the legacy Sonatype OSSRH publishing endpoint, which now enforces publishing limits with a 402 error. The approved exemption (10 releases, 100 MB, 8160 files monthly for io.serverlessworkflow) only applies to the new Maven Central Publishing API.

Solution

Backported the Maven Central migration from main (originally done in f20021f) to the 4.x branch:

  • Replace nexus-staging-maven-plugin with central-publishing-maven-plugin v0.11.0
  • Update workflow server-id from ossrh to central
  • Remove distributionManagement section (new plugin handles this)
  • Simplify release:perform invocation

Testing

After merge, retry the 4.3.0.Final release - it should now publish successfully through the new API that respects the exemption limits.

Migrates from legacy Sonatype OSSRH to new Maven Central Publishing API.
This resolves the 402 Payment Required error by using the new publishing
system that respects the approved exemption limits (10 releases, 100 MB,
8160 files monthly for io.serverlessworkflow).

Changes:
- Replace nexus-staging-maven-plugin with central-publishing-maven-plugin
- Update workflow server-id from 'ossrh' to 'central'
- Remove distributionManagement section (handled by new plugin)
- Simplify release:perform invocation
Copilot AI lite review requested due to automatic review settings September 21, 2026 15:39

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

A critical POM configuration issue prevents the publishing plugin from being activated.

Get a fresh assessment by requesting another Copilot review.

Review effort: Lite
Findings: 1 High severity

Open (1)
What changed in this PR

Migrates 4.x releases from OSSRH to the Maven Central Publishing API.

Changes:

  • Replaces the Nexus staging plugin with Central Publishing 0.11.0.
  • Removes legacy distribution management.
  • Updates release credentials and invocation.
File Summary
pom.xml Configures Maven Central publishing and removes OSSRH settings.
.github/​workflows/​release.yml Uses the central server ID and simplified release command.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread pom.xml
Comment on lines +276 to 280
<groupId>org.sonatype.central</groupId>
<artifactId>central-publishing-maven-plugin</artifactId>
<version>${version.org.sonatype.central}</version>
<extensions>true</extensions>
<configuration>
@ricardozanini

Copy link
Copy Markdown
Collaborator Author

Closing to recreate from updated 4.x branch

@ricardozanini
ricardozanini deleted the fix-ci-release-4.x-maven-central branch September 21, 2026 15:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants