Skip to content

ci: Upgrade central-publishing-maven-plugin to 0.12.0 - #84

Merged
liamhughes merged 1 commit into
mainfrom
liamhughes/bmbb-1251-central-plugin-0.12.0
Oct 15, 2026
Merged

liamhughes merged 1 commit into
mainfrom
liamhughes/bmbb-1251-central-plugin-0.12.0

Conversation

@liamhughes

@liamhughes liamhughes commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Background

Since 7 October, Maven Central has rejected the provider's pre-release bundles. The ubuntu-latest runner moved to Maven 3.10.0, and under 3.10 central-publishing-maven-plugin 0.8.0 stages artifacts with Maven's install mechanism, which now also writes maven-metadata-local.xml and _remote.repositories into the bundle. Central rejects maven-metadata-local.xml because its folder has no .pom.

Plugin 0.12.0 fixes the Maven 3.10 bundle bug and adds skipUpload, which builds the bundle without uploading it. Octopus, not Maven, owns the upload to Central.

A version bump alone isn't enough, which is why every build of #34 has failed since July. On newer versions skipPublishing also skips staging, so no central-bundle.zip is produced and the build fails at "Name the bundle".

This supersedes #34.

Part of BMBB-1251.

Changes

  • Upgraded central-publishing-maven-plugin from 0.8.0 to 0.12.0.
  • Replaced <skipPublishing>true</skipPublishing> with <skipUpload>true</skipUpload>.
  • Removed the server-id/server-username/server-password placeholders from setup-java, and the MAVEN_CENTRAL_* placeholder env vars. skipUpload doesn't need a central server entry.
  • Added a guard to "Name the bundle" that fails the build if the bundle contains maven-metadata-local.xml or _remote.repositories, so we catch this before Central does.

Testing

  • A local build on Maven 3.10.0, with no settings.xml server entry and GPG skipped, produced a 20-file bundle identical to the unsigned file list of the 7 October bundle that validated. CI signs it, which adds 4 .asc files for 24.
  • Checked that the guard fails on a zip containing both files.
  • Successful Octopus deployment here.
  • Maven Central: image

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@liamhughes
liamhughes requested a review from a team as a code owner October 14, 2026 23:39
@liamhughes liamhughes changed the title ci: Upgrade central-publishing-maven-plugin to 0.12.0 and build the bundle with skipUpload ci: Upgrade central-publishing-maven-plugin to 0.12.0 Oct 14, 2026
Comment on lines +74 to +77
# Maven Central rejects bundles containing local-repository metadata.
if unzip -l "$SRC" | grep -E 'maven-metadata-local\.xml|_remote\.repositories'; then
echo "Error: bundle contains local-repository metadata files"; exit 1
fi

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Not sure we really need this, but doesn't hurt.

@liamhughes
liamhughes merged commit 261c5d3 into main Oct 15, 2026
11 checks passed
@liamhughes
liamhughes deleted the liamhughes/bmbb-1251-central-plugin-0.12.0 branch October 15, 2026 03:55
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