Skip to content

Fix Maven Central publishing under Maven 3.10 - #148

Merged
odunayoogungbure-rgb merged 1 commit into
mainfrom
fix/central-publishing-plugin-0.12.0
Nov 5, 2026
Merged

odunayoogungbure-rgb merged 1 commit into
mainfrom
fix/central-publishing-plugin-0.12.0

Conversation

@odunayoogungbure-rgb

Copy link
Copy Markdown
Contributor

Why?

2.5.0 and 2.6.0 never reached Maven Central, so it still stops at 2.4.0.

  • 2.5.0 got as far as the upload, and Central rejected the bundle: Bundle has content that does NOT have a .pom file: com/mailersend/java-sdk (run). Between the 2.4.0 and 2.5.0 releases the GitHub runner image moved to a newer Maven, and 2.5.0's run used Maven 3.10's default plugins (install 3.1.4 → 3.2.0). With that Maven, central-publishing-maven-plugin 0.10.0 puts com/mailersend/java-sdk/maven-metadata-local.xml and _remote.repositories files into the bundle.
  • 2.6.0 was tagged on Add logic around domain reputation flow #143's merge, where the pom still said 2.5.0, so the tag check stopped it before the upload (run). Main's pom says 2.6.0 since MSD-15205: Review SDKs (recurring) #146, so it would now reach the upload and fail like 2.5.0.

Changes

  1. pom.xml: central-publishing-maven-plugin 0.10.0 → 0.12.0. The existing configuration is unchanged and 0.12.0 accepts it.

Risks

  • The check below skipped signing and the upload, so the first full run is the release. If Central rejects the bundle again, nothing is published.

Performance impact

None. Build-time plugin only; the SDK code is unchanged.

Security impact

None.

How to QA

Checked locally in Docker on main with mvn clean deploy -DskipTests -Dgpg.skip -DcentralBaseUrl=http://127.0.0.1:9, so the bundle is built and the upload fails locally:

Maven Plugin Bundle
3.9.16 0.10.0 Clean (the 2.4.0 setup, which published)
3.10.0 0.10.0 Adds maven-metadata-local.xml and _remote.repositories (the 2.5.0 setup, which was rejected)
3.10.0 0.12.0 Clean: only the jar, pom, sources, javadoc and their checksums

After the release, the Maven Publish run ends with "was successfully published", and https://repo1.maven.org/maven2/com/mailersend/java-sdk/2.6.0/java-sdk-2.6.0.pom returns 200.

How to release

  1. Merge.
  2. Delete the v2.6.0 release and tag, which point at Add logic around domain reputation flow #143's merge: gh release delete v2.6.0 --repo mailersend/mailersend-java --cleanup-tag --yes
  3. Create v2.6.0 again from main: gh release create v2.6.0 --repo mailersend/mailersend-java --target main --generate-notes
  4. 2.5.0 was never published; 2.6.0 includes its changes.

Rollback strategy

  • Migrations: none.
  • Data changes: none.
  • External dependencies: build-time plugin only; revert this PR to go back to 0.10.0.
  • Config: none.
  • A version published to Maven Central can't be pulled. A bad 2.6.0 would be superseded by 2.6.1.

Screenshots, recordings

N/A

I used AI to generate parts of this PR

Yes

Maven 3.10 on the GitHub runner makes 0.10.0 put maven-metadata-local.xml
and _remote.repositories into the bundle, and Central rejects it
("Bundle has content that does NOT have a .pom file"), which is why
2.5.0 never published. 0.12.0 leaves them out.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@odunayoogungbure-rgb odunayoogungbure-rgb self-assigned this Nov 5, 2026
@mailerlite-kritika

Copy link
Copy Markdown

Re-runViewConfidence Score: 4/5

[Medium risk] The review reported no findings, but it could not read the central-publishing-maven-plugin 0.12.0 release notes, so the claim that 0.12.0 stops adding maven-metadata-local.xml and _remote.repositories to the bundle is unverified upstream. The author's local Docker check supports it but skipped signing and the upload, so the first real release run is the first full test. The change is a 0.x minor step of a build-time publishing plugin that a revert undoes, which rates medium.

Summary

Bumps central-publishing-maven-plugin from 0.10.0 to 0.12.0

This is a minor step of a build-time plugin in pom.xml. The existing configuration (publishingServerId, autoPublish, waitUntil) is unchanged, and publish.yaml runs mvn clean deploy, which uses the plugin. I could not read the plugin's release notes: the upstream repository did not resolve through the tools. For that reason I did not verify the claim that 0.12.0 stops adding maven-metadata-local.xml and _remote.repositories to the bundle. The author's local Docker check supports it, but it skipped signing and the upload. The first real release run is therefore the first full test of the fix.

What's good

  • The description gives a clear root-cause analysis and a Maven-version by plugin-version matrix that backs the fix.
  • The change is minimal and easy to revert.
Review context · 1/5 commands
  • Commands run: gh

Reviews (1) · Last reviewed commit: "Bump central-publishing-maven-plugin to..." · claude-sonnet-5-5

@odunayoogungbure-rgb
odunayoogungbure-rgb merged commit a540e6f into main Nov 5, 2026
4 checks passed
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.

2 participants