Repository navigation
ci: pin Maven 3.9.16 in the publish job - #984
Merged
Merged
Conversation
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>
sbansla
approved these changes
Oct 14, 2026
shrutiburman
approved these changes
Oct 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
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-pluginstagesmaven-metadata-local.xmland_remote.repositories*into the bundle, and only deletes the Maven 3.9 namemaven-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.16step to the publish job in.github/workflows/test-and-deploy.yml. It downloads the tarball from archive.apache.org with arun:step (onlyactions/*actions are allowed), verifies the sha512 and prepends it toGITHUB_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 loggedPre 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