Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jul 10, 2025

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

  • Replaced nexus-staging-maven-plugin (v1.6.8) with central-publishing-maven-plugin (v0.6.0)
  • Configured new plugin with:
    • publishingServerId: central
    • autoPublish: false (manual publishing)
    • skipPublishing: ${skip.deployment} (respects existing deployment skip logic)

2. Removed Distribution Management

  • Removed the entire <distributionManagement> section from the main POM
  • The new plugin automatically derives repository URLs, eliminating the need for manual configuration

3. Updated Server Credentials

  • Changed server ID from ossrh to central in .mvn/ci-settings.xml
  • This aligns with the new Central Sonatype authentication requirements

4. Updated Repository URLs

  • Updated snapshot repository URL from https://s01.oss.sonatype.org/content/repositories/snapshots/ to https://central.sonatype.com/repository/maven-snapshots
  • Applied changes to:
    • Main POM repositories section
    • 14 template POM files in test resources
    • 4 test data settings.xml files

5. Updated Repository Names and IDs

  • Changed repository IDs from ossrh to central
  • Updated repository names from "OSSRH Snapshots" to "Central Repository Snapshots"

Files Modified

  • pom.xml - Main configuration changes
  • .mvn/ci-settings.xml - Server credential configuration
  • 14 template POM files in cobigen-templates/*/src/test/resources/utils/pom.xml
  • 4 test data files in cobigen/core-artifact-retriever/src/test/resources/testdata/
  • 2 test template files in 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
    • Triggering command: /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)
    • Triggering command: /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)
    • Triggering command: /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
    • Triggering command: /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.

@CLAassistant
Copy link

CLAassistant commented Jul 10, 2025

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

✅ maybeec
❌ Copilot
You have signed the CLA already but the status is still pending? Let us recheck it.

…lugin

Co-authored-by: maybeec <1427255+maybeec@users.noreply.github.com>
Copilot AI changed the title [WIP] Migrate to central sonatype Migrate from nexus-staging-maven-plugin to central-publishing-maven-plugin Jul 10, 2025
Copilot AI requested a review from maybeec July 10, 2025 19:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Migrate to central sonatype

3 participants