Skip to content

Conversation

@nobodyiam
Copy link
Member

@nobodyiam nobodyiam commented Jul 4, 2025

What's the purpose of this PR

As OSSRH has been shut down, we need to migrate to Central Publisher Portal. See https://central.sonatype.org/pages/ossrh-eol/

Follow this checklist to help us incorporate your contribution quickly and easily:

  • Read the Contributing Guide before making this pull request.
  • Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
  • Write necessary unit tests to verify the code.
  • Run mvn clean test to make sure this pull request doesn't break anything.
  • Update the CHANGES log.

Summary by CodeRabbit

  • Chores
    • Updated deployment endpoints for publishing to Maven Central to use the latest repository URLs.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jul 4, 2025

Walkthrough

The GitHub Actions workflow for Maven deployment has been updated to use new repository URLs for publishing to Apache Maven Central. The endpoints for both release and snapshot deployments now reference the ossrh-staging-api.central.sonatype.com domain instead of the previous oss.sonatype.org domain.

Changes

File(s) Change Summary
.github/workflows/release.yml Updated Maven Central deployment URLs to new ossrh-staging-api domain.

Poem

A hop, a skip, a Maven leap,
New URLs for packages we keep.
From oss to ossrh we go,
Our jars now flow where new winds blow.
With every push, the future's bright—
The rabbit’s code takes flight tonight! 🐇🚀


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 744e62e and 7a8fbaf.

📒 Files selected for processing (1)
  • .github/workflows/release.yml (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • .github/workflows/release.yml
⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: build (8)

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
.github/workflows/release.yml (1)

33-37: Update GitHub Action versions to the maintained v3 releases

actions/checkout@v2 and actions/setup-java@v1 are no longer receiving security updates.
Switching to @v3 gives SHA-256 signature verification, provenance attestations and performance improvements.

-    - uses: actions/checkout@v2
+    - uses: actions/checkout@v3
 ...
-    - name: Set up Maven Central Repository
-      uses: actions/setup-java@v1
+    - name: Set up Maven Central Repository
+      uses: actions/setup-java@v3
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e27c7b6 and 744e62e.

📒 Files selected for processing (1)
  • .github/workflows/release.yml (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: build (8)

gpg-passphrase: MAVEN_GPG_PASSPHRASE
- name: Publish to Apache Maven Central
run: mvn clean deploy -DskipTests=true -Prelease "-Dreleases.repo=https://oss.sonatype.org/service/local/staging/deploy/maven2" "-Dsnapshots.repo=https://oss.sonatype.org/content/repositories/snapshots"
run: mvn clean deploy -DskipTests=true -Prelease "-Dreleases.repo=https://ossrh-staging-api.central.sonatype.com/service/local/staging/deploy/maven2" "-Dsnapshots.repo=https://ossrh-staging-api.central.sonatype.com/content/repositories/snapshots"
Copy link
Contributor

Choose a reason for hiding this comment

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

💡 Verification agent

🧩 Analysis chain

Validate the new repository endpoints before merging

Sonatype’s migration guide points to the s01.oss.sonatype.org host for both staging and snapshot uploads.
The URLs used here (ossrh-staging-api.central.sonatype.com) appear to be the REST portal endpoints, not the Maven‐deploy endpoints. A mismatch will cause mvn deploy to fail with 404/401 errors once the workflow runs.


🌐 Web query:

What is the correct Maven deploy URL recommended by Sonatype after oss.sonatype.org shutdown?

💡 Result:

After the shutdown of oss.sonatype.org and the sunset of the legacy OSSRH service on June 30th, 2025, Sonatype recommends using the new Central Publisher Portal and API for Maven Central deployments. The correct and recommended deploy URL for publishing to Maven Central is:

https://central.sonatype.com/api/v1/publisher

This is now the official endpoint for deploying release artifacts using modern publishing tools such as JReleaser and is part of the new publishing workflow. Your Maven (or Gradle, or publishing tool) configuration should use this URL in place of the older endpoints[1].

If you still need to use the old Maven Nexus workflows (and are already registered for legacy access), the last supported deploy URLs were:

  • For releases:
    https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/
  • For snapshots:
    https://s01.oss.sonatype.org/content/repositories/snapshots/

However, these will be (or have been) sunset for most users in favor of the Central Publisher Portal and API[7][9][10].

Summary Table

Use Case Recommended URL
New standard deploy https://central.sonatype.com/api/v1/publisher
(Legacy) releases https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/
(Legacy) snapshots https://s01.oss.sonatype.org/content/repositories/snapshots/

Important Notes:

  • You must also use token-based authentication instead of username/password going forward[5][7].
  • New projects and namespaces should be registered via central.sonatype.com, not the old JIRA/OSSRH system[1][5][8].
  • Always consult the official Sonatype documentation for the latest requirements and workflow changes.

Recommendation:
Update your build tooling to target https://central.sonatype.com/api/v1/publisher and migrate to token-based authentication to comply with the new Maven Central publishing workflow[1].

Citations:


Update Maven Central publish endpoint and migrate to token-based auth

Maven Central has transitioned to the new Central Publisher API for release deployments. Replace the deprecated ossrh-staging-api.central.sonatype.com URLs with the official endpoint and switch to token authentication.

• File: .github/workflows/release.yml
• Location: the run: mvn clean deploy … step

Suggested diff:

- run: mvn clean deploy -DskipTests=true -Prelease \
-   "-Dreleases.repo=https://ossrh-staging-api.central.sonatype.com/service/local/staging/deploy/maven2" \
-   "-Dsnapshots.repo=https://ossrh-staging-api.central.sonatype.com/content/repositories/snapshots"
+ run: mvn clean deploy -DskipTests=true -Prelease \
+   "-Dreleases.repo=https://central.sonatype.com/api/v1/publisher" \
+   "-Dsnapshots.repo=https://s01.oss.sonatype.org/content/repositories/snapshots/" \
+   -DsonatypeToken=${{ secrets.SONATYPE_TOKEN }}

Action items:

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
run: mvn clean deploy -DskipTests=true -Prelease "-Dreleases.repo=https://ossrh-staging-api.central.sonatype.com/service/local/staging/deploy/maven2" "-Dsnapshots.repo=https://ossrh-staging-api.central.sonatype.com/content/repositories/snapshots"
run: mvn clean deploy -DskipTests=true -Prelease \
"-Dreleases.repo=https://central.sonatype.com/api/v1/publisher" \
"-Dsnapshots.repo=https://s01.oss.sonatype.org/content/repositories/snapshots/" \
-DsonatypeToken=${{ secrets.SONATYPE_TOKEN }}
🤖 Prompt for AI Agents
In .github/workflows/release.yml at line 44, update the Maven deploy command to
use the new Central Publisher API endpoint by replacing the release URL with
https://central.sonatype.com/api/v1/publisher and update the snapshots URL to
https://s01.oss.sonatype.org/content/repositories/snapshots/ if snapshots are
published. Additionally, add the Sonatype token from secrets.SONATYPE_TOKEN and
pass it to Maven using the -DsonatypeToken property to enable token-based
authentication.

@nobodyiam nobodyiam merged commit d8115d9 into apolloconfig:main Jul 4, 2025
8 checks passed
@nobodyiam nobodyiam deleted the update_oss_rh branch July 4, 2025 06:22
@github-actions github-actions bot locked and limited conversation to collaborators Jul 4, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant