Skip to content

ci: pin Maven 3.9.16 in the publish job - #984

Merged
kridai merged 3 commits into
mainfrom
dry-run-central-publishing-main
Oct 14, 2026
Merged

kridai merged 3 commits into
mainfrom
dry-run-central-publishing-main

Conversation

@kridai

@kridai kridai commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Why

The 13.1.0 publish failed Sonatype validation: Bundle has content that does NOT have a .pom file: com/twilio/sdk/twilio.

Cause: the runner image's Maven moved from 3.9.16 to 3.10.0. With 3.10.0, central-publishing-maven-plugin stages maven-metadata-local.xml and _remote.repositories* into the bundle, and only deletes the Maven 3.9 name maven-metadata-central-staging.xml. Reproduced locally: Maven 3.10.0 gives a bundle with the stray files, 3.9.16 gives a clean one.

Known upstream: mavenplugins/central-publishing-maven-plugin#78, #79 (fix PR #80, open and unreleased), and apache/maven#13388. A newer plugin version does not help yet (plugin 1.3.1 on Maven 3.10.0 failed the same way).

What

Adds a Pin Maven 3.9.16 step to the publish job in .github/workflows/test-and-deploy.yml. It downloads the tarball from archive.apache.org with a run: step (only actions/* actions are allowed), verifies the sha512 and prepends it to GITHUB_PATH. Remove it once the plugin fix is released.

No other changes.

Tested

A dry run of an earlier revision of this branch (publish job with the pin, autoPublish=false, dropValidated=true; run 38533238588) passed: Maven 3.9.16 was used, the plugin logged Pre Bundling - deleted ...maven-metadata-central-staging.xml, Sonatype validated the bundle, and the deployment was deleted. The dry-run-only workflow input and plugin bump used for that test have since been removed.

🤖 Generated with Claude Code

The 13.1.0 publish failed Sonatype validation ("Bundle has content that
does NOT have a .pom file: com/twilio/sdk/twilio") after the runner image
moved from Maven 3.9.16 to 3.10.0 with central-publishing-maven-plugin 0.8.0.

- Switch to io.github.mavenplugins:central-publishing-maven-plugin 1.3.1
- Make autoPublish/dropValidated properties (defaults unchanged)
- Add a dry_run input to the release workflow: runs the real deploy but with
  autoPublish=false and dropValidated=true, so Sonatype validates the bundle
  and the deployment is dropped. Skips creating the GitHub release.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Maven 3.10.0 (runner image default) makes central-publishing-maven-plugin
stage maven-metadata-local.xml and _remote.repositories into the bundle, so
Maven Central rejects it with "Bundle has content that does NOT have a .pom
file". Upstream: mavenplugins/central-publishing-maven-plugin#78, #79 (fix in
#80, not yet released), apache/maven#13388.

Download Maven 3.9.16 with a run step (only actions/* are allowed), verify its
sha512 and prepend it to GITHUB_PATH. Same approach as
emmansun/spring-data-mongodb-encrypt@43f6490.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The dry run (run 38533238588) showed Maven Central validates the bundle with
Maven 3.9.16 pinned, so the plugin bump and the dry_run workflow input are not
needed. Restore pom.xml and the rest of the workflow to main.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@kridai kridai changed the title chore: update central-publishing-maven-plugin and add publish dry run ci: pin Maven 3.9.16 in the publish job Oct 14, 2026
@kridai
kridai merged commit 0155569 into main Oct 14, 2026
15 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.

3 participants