Skip to content

Migrate from deprecated nexus-staging-maven-plugin to central-publishing-maven-plugin#53

Open
Copilot wants to merge 3 commits into
masterfrom
copilot/update-pom-for-migration
Open

Migrate from deprecated nexus-staging-maven-plugin to central-publishing-maven-plugin#53
Copilot wants to merge 3 commits into
masterfrom
copilot/update-pom-for-migration

Conversation

Copilot AI commented Feb 9, 2026

Copy link
Copy Markdown

The nexus-staging-maven-plugin is deprecated. Maven Central now uses the central-publishing-maven-plugin for artifact publication.

Changes

Plugin replacement:

  • org.sonatype.plugins:nexus-staging-maven-plugin:1.6.6org.sonatype.central:central-publishing-maven-plugin:0.6.0

Configuration parameters:

  • serverIdpublishingServerId
  • nexusUrl → (removed)
  • autoReleaseAfterCloseautoPublish

Removed distributionManagement override:

  • The distributionManagement section in the release profile has been removed to allow the central-publishing-maven-plugin to handle the deployment flow through its own mechanism, rather than using Maven's standard deploy process.

All changes are scoped to the release profile. The GPG signing configuration remains unchanged.


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot stopped work on behalf of garricko due to an error February 10, 2026 00:13
…-maven-plugin

Co-authored-by: garricko <1234201+garricko@users.noreply.github.com>
Copilot AI changed the title [WIP] Update pom to migrate from deprecated nexus-staging-maven-plugin Migrate from deprecated nexus-staging-maven-plugin to central-publishing-maven-plugin Feb 10, 2026
Copilot AI requested a review from garricko February 10, 2026 00:33
@garricko garricko marked this pull request as ready for review February 10, 2026 06:15
@garricko garricko requested a review from Copilot February 10, 2026 06:16

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Migrates the release profile’s Maven Central publishing setup from the deprecated nexus-staging-maven-plugin to central-publishing-maven-plugin, updating the target endpoint and configuration keys.

Changes:

  • Replaced nexus-staging-maven-plugin with central-publishing-maven-plugin in the release profile.
  • Updated distributionManagement repository id/url to the new “central” endpoint.
  • Updated plugin configuration (serverIdpublishingServerId, autoReleaseAfterCloseautoPublish) and removed nexusUrl.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread pom.xml Outdated
Comment on lines 608 to 613
<distributionManagement>
<repository>
<id>ossrh</id>
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
<id>central</id>
<url>https://central.sonatype.com/api/v1/publisher</url>
</repository>
</distributionManagement>

Copilot AI Feb 10, 2026

Copy link

Choose a reason for hiding this comment

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

The <distributionManagement><repository><url> is used by Maven’s deploy mechanism as a Maven repository base URL. https://central.sonatype.com/api/v1/publisher is a REST API endpoint (not a standard Maven repository layout), so mvn deploy in this profile is likely to fail when it attempts artifact uploads. Consider either (a) not overriding distributionManagement here and letting the central publishing plugin handle the upload/publish flow, or (b) configuring the build so the standard deploy step is skipped and publishing is performed only via the central publishing plugin’s goals (with distributionManagement not pointing at the API endpoint).

Copilot uses AI. Check for mistakes.

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 apply changes based on this feedback by not overriding distributionManagement

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Removed the distributionManagement override from the release profile. The central-publishing-maven-plugin now handles the deployment flow through its own mechanism. (27ad16f)

Co-authored-by: garricko <1234201+garricko@users.noreply.github.com>

Copilot AI commented Feb 10, 2026

Copy link
Copy Markdown
Author

Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • repository.sonatype.org
    • Triggering command: /usr/lib/jvm/temurin-17-jdk-amd64/bin/java /usr/lib/jvm/temurin-17-jdk-amd64/bin/java --enable-native-access=ALL-UNNAMED -classpath /usr/share/apache-maven-3.9.12/boot/plexus-classworlds-2.9.0.jar -Dclassworlds.conf=/usr/share/apache-maven-3.9.12/bin/m2.conf -Dmaven.home=/usr/share/apache-maven-3.9.12 -Dlibrary.jansi.path=/usr/share/apache-maven-3.9.12/lib/jansi-native -Dmaven.multiModuleProjectDirectory=/home/REDACTED/work/vertx-parent/vertx-parent org.codehaus.plexus.classworlds.launcher.Launcher help:effective-pom -Prelease (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

@garricko garricko requested review from borispgit and tpacht February 10, 2026 06:34
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.

4 participants