Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 14, 2025

Description

Migrates Maven publishing from legacy OSSRH Nexus staging to the Central Publisher Portal API. This modernizes the release infrastructure without affecting artifact consumers.

Resolves #328

Changes

Maven Configuration (pom.xml)

  • Replace nexus-staging-maven-plugin (1.7.0) → central-publishing-maven-plugin (0.6.0)
  • Update distributionManagement to Central Portal API endpoint
  • Change server ID: ossrhcentral
  • Configure autoPublish=true and waitUntil=published for automated releases

GitHub Workflows

  • Update maven-publish.yml and maven-publish-snapshot.yml server-id from ossrh to central
  • Keep existing secret names: Continue using OSSRH_USERNAME and OSSRH_TOKEN (no secret changes required)

Required Action

No secret updates required! The existing GitHub secrets will work with the Central Publisher Portal:

  • OSSRH_USERNAME and OSSRH_TOKEN remain unchanged and will be used for Central Portal authentication
  • Existing GPG secrets (MAVEN_GPG_PRIVATE_KEY, MAVEN_GPG_PASSPHRASE) remain unchanged

Checklist:

  • Public methods are documented
  • Public methods are tested
  • New and existing tests pass when run locally
  • There are no new warnings or errors
Original prompt

This section details on the original issue you should resolve

<issue_title>[Chore]: Switch Maven publishing workflow to Central Publisher Portal</issue_title>
<issue_description>### What

Switch the Maven publishing workflow to use the Central Publisher Portal as documented at https://central.sonatype.org/publish/publish-portal-maven/. Update automation and documentation as needed.

Why

The Central Publisher Portal offers a unified, reliable, and modern flow for publishing Maven artifacts to Maven Central. This change will improve maintainability and future-proof the release process.

Notes

Reference documentation: https://central.sonatype.org/publish/publish-portal-maven/
Please update automation scripts and documentation to reflect the new workflow. No breaking changes expected for consumers.</issue_description>

Comments on the Issue (you are @copilot in this section)


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 2 commits November 14, 2025 22:53
Co-authored-by: thomasturrell <1552612+thomasturrell@users.noreply.github.com>
Co-authored-by: thomasturrell <1552612+thomasturrell@users.noreply.github.com>
Copilot AI changed the title [WIP] Switch Maven publishing workflow to Central Publisher Portal Switch Maven publishing workflow to Central Publisher Portal Nov 14, 2025
Copilot AI requested a review from thomasturrell November 14, 2025 22:57
@thomasturrell
Copy link
Contributor

@copilot I don't want to change the secrets key names at this point.

Co-authored-by: thomasturrell <1552612+thomasturrell@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Nov 15, 2025

@copilot I don't want to change the secrets key names at this point.

Done. Reverted to using existing secret names OSSRH_USERNAME and OSSRH_TOKEN in both workflows. The server-id remains changed to central as required for the Central Publisher Portal. (commit 1de6382)

@thomasturrell
Copy link
Contributor

@copilot remove the release documentation. We will add it in later. Free free to create a core issue for it.

Co-authored-by: thomasturrell <1552612+thomasturrell@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Nov 15, 2025

@copilot remove the release documentation. We will add it in later. Free free to create a core issue for it.

Done. Removed RELEASE.md in commit b259258.

I don't have permissions to create GitHub issues, but here's the suggested issue content:

Title: [Chore]: Add release documentation for Central Publisher Portal

Description:

What

Add comprehensive release documentation explaining how to publish releases using the Central Publisher Portal.

Why

The project now uses the Central Publisher Portal for Maven publishing (as of PR #329), but documentation about the release process is needed for maintainers.

Notes

Documentation should cover:

  • Prerequisites and required GitHub secrets (OSSRH_USERNAME, OSSRH_TOKEN, GPG keys)
  • Step-by-step release instructions using GitHub Actions
  • Snapshot publishing process
  • Manual release fallback procedure
  • Migration notes from legacy OSSRH
  • Links to official Central Portal documentation

Reference: https://central.sonatype.org/publish/publish-portal-maven/

@thomasturrell thomasturrell marked this pull request as ready for review November 15, 2025 11:58
@sonarqubecloud
Copy link

@thomasturrell thomasturrell merged commit 9ba7b47 into main Nov 15, 2025
4 checks passed
@thomasturrell thomasturrell deleted the copilot/switch-maven-publishing-workflow branch November 15, 2025 12:06
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.

[Chore]: Switch Maven publishing workflow to Central Publisher Portal

2 participants