Skip to content

Deploy: snapshots through the Maven deploy plugin, metadata once per module - #58

Closed
stbischof wants to merge 1 commit into
mainfrom
fix/snapshot-deploy-plugin
Closed

stbischof wants to merge 1 commit into
mainfrom
fix/snapshot-deploy-plugin

Conversation

@stbischof

Copy link
Copy Markdown
Contributor

Since 12 November the snapshot deploy of org.eclipse.daanse.sql has failed with HTTP 429 from https://central.sonatype.com/repository/maven-snapshots/. It failed seven times in a row on the merge of eclipse-daanse/org.eclipse.daanse.sql#92 (run). Eclipse EDC has reported the same since the same day (helpdesk #8073).

[ERROR] Failed to execute goal org.sonatype.central:central-publishing-maven-plugin:0.8.0:publish (injected-central-publishing) on project org.eclipse.daanse.sql.statement.demo: Failed to deploy metadata: Could not transfer metadata org.eclipse.daanse:org.eclipse.daanse.sql.dialect.db.hive/maven-metadata.xml from/to central (https://central.sonatype.com/repository/maven-snapshots/): status code: 429, reason phrase: Too Many Requests (429)

Why a rerun never gets through

For a snapshot, the central-publishing plugin first collects every file of the reactor in a local index (302 files for sql). In ArtifactDeferrerImpl.deployUp it then deploys them one at a time:

  • Order. The files go in the iteration order of Properties.stringPropertyNames() over their paths. That is a fixed hash order, not the order of the modules.
  • One deploy per file. Each file is its own deploy. Besides the file, it fetches and uploads the version and artifact metadata and their checksums again.
  • No retry. The loop stops at the first refused request.

0.12.0, the latest release, has the same loop.

In each of the seven runs, the refusals came after the 50th to 65th file. Each run started with the same files, so it got no further than the one before.

On Central, only the artifacts whose main file sorts among the first ~65 now point to the build of sql#92. The rest still point to the build before it. The <timestamp> at the top of their maven-metadata.xml is misleading here: what a build resolves is the <snapshotVersion> entry of each file.

Change

reuse_java_deploy.yml reads the project version first.

  • A release goes through the deploy profile and the central-publishing plugin, as before: bundled, signed, published.
  • A snapshot goes without the deploy profile, through the Maven deploy plugin to the snapshotRepository of the parent pom. Central documents this way for snapshots.
    • Each module is deployed with its build, and its metadata go up once.
    • A snapshot has no signatures, sources or javadoc, and SHA-1 as its only checksum (aether.checksums.algorithms). The snapshot repository validates none of these.
    • For sql that is 95 files instead of 302, and one metadata round per module instead of one per file.

Sonatype's 429 FAQ asks for less traffic rather than more retries, so the change adds no retries.

…module

Since 12 November the snapshot repository of Central answers a burst of
uploads with HTTP 429. For a snapshot, the central-publishing plugin
uploads the files of a reactor one at a time in the hash order of their
paths, each with its own round of metadata and checksums, and stops at
the first refusal. A reactor the size of org.eclipse.daanse.sql is cut
short at the same file on every run: the first files go up again and
again, the rest never.

A snapshot now goes without the deploy profile, through the Maven deploy
plugin to the snapshotRepository of the parent pom: each module with its
build, its metadata once, without signatures, sources and javadoc, and
with SHA-1 checksums only, none of which the snapshot repository asks
for. A release still goes through the deploy profile and the
central-publishing plugin.

Signed-off-by: Stefan Bischof <stbischof@bipolis.org>
@sonarqubecloud

Copy link
Copy Markdown

@stbischof stbischof closed this Nov 13, 2026
@stbischof
stbischof deleted the fix/snapshot-deploy-plugin branch November 13, 2026 18:19
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.

1 participant