Migrate from nexus-staging-maven-plugin to central-publishing-maven-plugin #1701
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR migrates the CobiGen project from the legacy OSS1 Sonatype deployment system (nexus-staging-maven-plugin) to the new Central Sonatype deployment system (central-publishing-maven-plugin).
Changes Made
1. Updated Maven Plugin Configuration
nexus-staging-maven-plugin(v1.6.8) withcentral-publishing-maven-plugin(v0.6.0)publishingServerId: centralautoPublish: false(manual publishing)skipPublishing: ${skip.deployment}(respects existing deployment skip logic)2. Removed Distribution Management
<distributionManagement>section from the main POM3. Updated Server Credentials
ossrhtocentralin.mvn/ci-settings.xml4. Updated Repository URLs
https://s01.oss.sonatype.org/content/repositories/snapshots/tohttps://central.sonatype.com/repository/maven-snapshots5. Updated Repository Names and IDs
ossrhtocentralFiles Modified
pom.xml- Main configuration changes.mvn/ci-settings.xml- Server credential configurationcobigen-templates/*/src/test/resources/utils/pom.xmlcobigen/core-artifact-retriever/src/test/resources/testdata/cobigen/cobigen-core/src/test/resources/testdata/Validation
✅ XML structure validated as well-formed
✅ Maven validate phase passes successfully
✅ Central publishing plugin loads correctly
✅ Non-Eclipse modules build successfully with new configuration
The migration follows all requirements from the Central Sonatype documentation and maintains backward compatibility with existing deployment workflows.
Fixes #1700.
Warning
Firewall rules blocked me from connecting to one or more addresses
I tried to connect to the following addresses, but was blocked by firewall rules:
archive.eclipse.org/usr/lib/jvm/temurin-17-jdk-amd64/bin/java --enable-native-access=ALL-UNNAMED -classpath /usr/share/apache-maven-3.9.10/boot/plexus-classworlds-2.9.0.jar -Dclassworlds.conf=/usr/share/apache-maven-3.9.10/bin/m2.conf -Dmaven.home=/usr/share/apache-maven-3.9.10 -Dlibrary.jansi.path=/usr/share/apache-maven-3.9.10/lib/jansi-native -Dmaven.multiModuleProjectDirectory=/home/REDACTED/work/cobigen/cobigen org.codehaus.plexus.classworlds.launcher.Launcher clean compile -U(dns block)/usr/lib/jvm/temurin-17-jdk-amd64/bin/java --enable-native-access=ALL-UNNAMED -classpath /usr/share/apache-maven-3.9.10/boot/plexus-classworlds-2.9.0.jar -Dclassworlds.conf=/usr/share/apache-maven-3.9.10/bin/m2.conf -Dmaven.home=/usr/share/apache-maven-3.9.10 -Dlibrary.jansi.path=/usr/share/apache-maven-3.9.10/lib/jansi-native -Dmaven.multiModuleProjectDirectory=/home/REDACTED/work/cobigen/cobigen org.codehaus.plexus.classworlds.launcher.Launcher help:evaluate -Dexpression=project.modules(dns block)/usr/lib/jvm/temurin-17-jdk-amd64/bin/java --enable-native-access=ALL-UNNAMED -classpath /usr/share/apache-maven-3.9.10/boot/plexus-classworlds-2.9.0.jar -Dclassworlds.conf=/usr/share/apache-maven-3.9.10/bin/m2.conf -Dmaven.home=/usr/share/apache-maven-3.9.10 -Dlibrary.jansi.path=/usr/share/apache-maven-3.9.10/lib/jansi-native -Dmaven.multiModuleProjectDirectory=/home/REDACTED/work/cobigen/cobigen org.codehaus.plexus.classworlds.launcher.Launcher help:effective-pom -q -Doutput=/tmp/effective-pom.xml(dns block)repository.sonatype.org/usr/lib/jvm/temurin-17-jdk-amd64/bin/java --enable-native-access=ALL-UNNAMED -classpath /usr/share/apache-maven-3.9.10/boot/plexus-classworlds-2.9.0.jar -Dclassworlds.conf=/usr/share/apache-maven-3.9.10/bin/m2.conf -Dmaven.home=/usr/share/apache-maven-3.9.10 -Dlibrary.jansi.path=/usr/share/apache-maven-3.9.10/lib/jansi-native -Dmaven.multiModuleProjectDirectory=/home/REDACTED/work/cobigen/cobigen org.codehaus.plexus.classworlds.launcher.Launcher clean compile -U(dns block)If you need me to access, download, or install something from one of these locations, you can either:
💡 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.