Skip to content

Fix Maven Central release: pin Maven 3.9.16, bump central-publishing to 0.11.0 - #1165

Merged
vharseko merged 1 commit into
OpenIdentityPlatform:masterfrom
vharseko:release-pin-maven-3.9
Oct 11, 2026
Merged

vharseko merged 1 commit into
OpenIdentityPlatform:masterfrom
vharseko:release-pin-maven-3.9

Conversation

@vharseko

Copy link
Copy Markdown
Member

Refs OpenIdentityPlatform/commons#325 (workaround only, the issue stays open)

Problem

Since the ubuntu-24.04 runner image 20261004 replaced the system Maven 3.9.x with 3.10.0, releases to Maven Central fail in validation:

Bundle has content that does NOT have a .pom file: <every artifact directory>

Under Maven 3.10, central-publishing-maven-plugin leaves local-repository files in its staging directory, and they end up in central-bundle.zip:

  • maven-metadata-local.xml in every artifact directory
  • _remote.repositories (+ checksums) in every version directory

This first hit OpenIdentityPlatform/commons in release run 38121296549. The commons issue has the local reproduction and the upstream links. Plugin 0.8.0 and 0.11.0 behave the same.

Changes

Same workaround as OpenIdentityPlatform/commons#324:

  • release.yml: before the release, install Maven 3.9.16 from archive.apache.org with a pinned sha512 and put it first on PATH. release:perform runs its nested build with the same Maven.
  • pom.xml: bump central-publishing-maven-plugin from 0.8.0 to 0.11.0. On its own, 0.11.0 does not fix the Maven 3.10 issue.

…to 0.11.0

Maven 3.10 on the runner leaves maven-metadata-local.xml and
_remote.repositories files in the central-publishing staging
directory. They end up in central-bundle.zip, and Maven Central
rejects the release with "Bundle has content that does NOT have a
.pom file". Install Maven 3.9.16 (sha512-verified) before the release
so the bundle stays clean.

Also bump central-publishing-maven-plugin from 0.8.0 to 0.11.0.
0.11.0 alone does not fix the Maven 3.10 issue.

Same workaround as OpenIdentityPlatform/commons#324.
@vharseko vharseko added dependencies Pull requests that update a dependency file ci CI, GitHub Actions, or build pipeline labels Oct 11, 2026
@vharseko
vharseko merged commit 0f5b137 into OpenIdentityPlatform:master Oct 11, 2026
9 of 14 checks passed
@vharseko
vharseko deleted the release-pin-maven-3.9 branch October 11, 2026 16:29
vharseko added a commit that referenced this pull request Nov 6, 2026
)

Fixes OpenIdentityPlatform/commons#325.

Upgrade `org.sonatype.central:central-publishing-maven-plugin` from
0.11.0 to 0.12.0 and remove the Maven 3.9.16 installation step
introduced by #1165. Releases can use the runner's Maven again because
0.12.0 removes Maven 3.10 metadata, tracking files, and locks before
bundling.

The fix is documented in the [official 0.12.0 release
notes](https://central.sonatype.org/publish/publish-portal-maven/#0120-13-oct-2026)
and [upstream PR
#3](sonatype-nexus-community/central-publishing-maven-plugin#3).
This applies the same update as [commons
#388](OpenIdentityPlatform/commons#388).

Validation on Maven 3.10.0 / JDK 11:

- Reproduced the old parent POM bundle's six unwanted repository files
with plugin 0.11.0 and upload directed to a closed loopback port. With
0.12.0 and `-DskipUpload=true`, `deploy -N` succeeds and the bundle
contains only the POM and its four checksums. Used a temporary
release-version copy, dummy credentials, and skipped GPG signing.
- POM XML and release workflow YAML parse, and `git diff --check`
passes.

The full reactor and the GitHub release workflow were not run.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci CI, GitHub Actions, or build pipeline dependencies Pull requests that update a dependency file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant