You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[3.10.0] LegacyLocalRepositoryManager.overlay() now writes Resolver local-repository files into the target repository (breaks central-publishing-maven-plugin) #13388
Since Maven 3.10.0, LegacyLocalRepositoryManager.overlay(ArtifactRepository, RepositorySystemSession, RepositorySystem) changed:
3.10.0: for a repository that uses DefaultRepositoryLayout, it returns a session whose local repository manager is a regular Resolver 2 manager, set up by DefaultRepositorySystemSessionFactory.setUpLocalRepositoryManager. This came with Feat: Maven 3.x with Resolver 2.x #11778.
3.9.x: it always wrapped the repository in a LegacyLocalRepositoryManager.
As a result, a plugin that calls the maven-compat ArtifactInstaller.install(file, artifact, repository) to install into a directory that is not the local repository now gets local-repository bookkeeping files in that directory:
File
3.9.x
3.10.0
Group/artifact-level metadata
maven-metadata-<repositoryId>.xml
maven-metadata-local.xml
Origin tracking
none
<version>/_remote.repositories
Locks
none
.locks/*.lock (file-lock named locks, the Resolver 2 default)
Impact.org.sonatype.central:central-publishing-maven-plugin 0.11.0, the current release used to publish to Maven Central, stages release artifacts this way into target/central-staging (repository id central-staging). It then:
deletes only maven-metadata-central-staging.xml;
zips the staging directory;
uploads the bundle.
Maven Central then rejects the deployment:
Deployment ... failed
common:
- Bundle has content that does NOT have a .pom file: org/metricshub/jflat
This is also reported at mavenplugins/central-publishing-maven-plugin#78, where a multi-module project hits the same error. The plugin sources are not public, so I am reporting the Maven side here, and I am reporting the plugin side to Sonatype support.
Reproduction
Use Maven 3.10.0 with any jar project that has a release version and central-publishing-maven-plugin 0.11.0 as an extension (<extensions>true</extensions>).
Run mvn deploy -DcentralBaseUrl=http://127.0.0.1:9. The bundle is built, and the upload then fails locally.
List target/central-publishing/central-bundle.zip. It contains:
.locks/artifact~<g>~<a>~...lock
<g>/<a>/<v>/_remote.repositories
<g>/<a>/maven-metadata-local.xml
With Maven 3.9.12, the same bundle contains only the artifacts and their checksums.
keep the 3.9 behaviour of overlay() for a repository that is not the session's local repository: metadata named after the repository id, and no tracking or lock files written into the target directory; or
list this as a breaking change for maven-compat callers in the 3.10.0 release notes, so that plugin authors can adapt.
I can test a fix or a snapshot.
Reacted by Oleksandr Porunov, Luboš Račanský, Michael Prankl, Alex "Blex" B, chris-twiner and ObserverOfTime
The mentioned plugin relies on deprecated Maven 2 features (the maven-compat, that is a module in Maven 3 providing Maven 2 backward compatibility). This is the reason why the mentioned plugin does not work in Maven 4 (major versions provides V-1 but not V-2 compatibility, so Maven 4 will not support Maven 2 stuff).
FYI, last week the image used by Github CI action runners started using Maven CLI 3.10.0 (previous week was 3.9.16). That change triggered this condition for us and caused our builds to fail this week. It took a fair amount of investigation to find this issue. I suspect this change is likely to cause people to see this with greater frequency now.
Activity
fix(ci): pin Maven 3.9.16 so Central publishing produces a valid bundle
cstamas commentedon Oct 9, 2026
The mentioned plugin relies on deprecated Maven 2 features (the
maven-compat, that is a module in Maven 3 providing Maven 2 backward compatibility). This is the reason why the mentioned plugin does not work in Maven 4 (major versions provides V-1 but not V-2 compatibility, so Maven 4 will not support Maven 2 stuff).The plugin should be fixed.
Recommended replacement is https://maveniverse.eu/docs/njord/
ci: Pin Maven 3.9 when publishing to Maven Central (cvc5#13062)
Pin Maven 3.9.16 in Release CI (#134)
Pin Maven 3.9.16 in Release CI (#12)
Pin Maven 3.9.16 in Release CI (#10)
Pin Maven 3.9.16 in Release CI (#117)
Pin Maven 3.9.16 in Release CI (#46)
Pin Maven 3.9.16 in Release CI (#225)
Pin Maven 3.9.16 in Release CI (#419)
Pin Maven 3.9.16 in Release CI (#987)
Pin Maven 3.9.16 in Release CI (#14)
puredanger commentedon Oct 11, 2026
FYI, last week the image used by Github CI action runners started using Maven CLI 3.10.0 (previous week was 3.9.16). That change triggered this condition for us and caused our builds to fail this week. It took a fair amount of investigation to find this issue. I suspect this change is likely to cause people to see this with greater frequency now.
Publish to Maven Central with Maven 3.9
Workaround for å hindre metadata-filer i central-bundle.zip som laste…
ci: pin Maven 3.9.16 and Central plugin 0.11.0 for releases
Pin Maven 3.9.16 in release workflow (apache/maven#13388: Maven 3.10.…
ci: pin Maven 3.9.16 in the publish job
ci: pin Maven 3.9.16 in the publish job (#984)
gnodet commentedon Oct 14, 2026
The issue has been fixed by sonatype-nexus-community/central-publishing-maven-plugin#3
ci(publish): Maven 3.9.16 brought along, not borrowed from the runner
ci(publish): Maven 3.9.16 brought along, not borrowed from the runner
ci(release): pin Maven to 3.9.9 for the Central publish
SDK for Java: release with Maven 3.9.11, not the runner's 3.10.0
build: IFS-5612 add workaround to remove files that shouldn't be crea…
ci(release): pin Maven 3.9 — Maven 3.10 breaks the Central bundle
[PP-16100] Apply temporary workaround for failing maven deployments
fix(release): publish to Maven Central with central-publishing-maven-…