Repository navigation
ci(maven): pin Maven 3.9 and skip an existing GitHub Packages upload - #1204
Merged
Merged
Conversation
The ubuntu-24.04 image 20261004 updates Maven from 3.9.16 to 3.10.0. Maven 3.10 stages a maven-metadata-local.xml next to the version directory. central-publishing-maven-plugin 0.11.0 deletes only maven-metadata-central-staging.xml, so the file stays in the bundle. Central then rejects the bundle with "Bundle has content that does NOT have a .pom file", and the v7.5.0 and v7.5.1 releases of odr-core-java did not get to Maven Central. A Maven Wrapper in jni/ pins Maven 3.9.16 with a checksum, and the workflow uses it for all three builds. The upload to GitHub Packages succeeds before the Central step runs. A rerun then gets 409 from GitHub Packages and stops before Central. The publish step now skips the upload if the pom of that version is already on GitHub Packages. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LkhPXqd9UFL99dDDkMDKQN
The deploy uploads the pom before the jar. If an upload stops after the pom, a check for the pom skips the jar on every rerun. A check for the jar skips only an upload that completed. Also tell jni/AGENTS.md to build through mvnw, and reflow the README paragraph. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LkhPXqd9UFL99dDDkMDKQN
andiwand
force-pushed
the
ci/pin-maven-3.9
branch
from
October 10, 2026 11:37
691b2d5 to
f8c08e1
Compare
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.
🤖 Generated with Claude Code
Problem
The maven workflow failed for v7.5.0 and v7.5.1. Maven Central does not have
odr-core-java7.5.0 or 7.5.1. The latest version on Maven Central is 7.4.0. The AAR (odr-core-android) is not affected, because it uses Gradle.Sonatype rejected the bundle:
Cause
The ubuntu-24.04 runner image
20261004.327updates Maven from 3.9.16 to 3.10.0. v7.4.0 ran on20260927.320and passed.Maven 3.10 stages
app/opendocument/odr-core-java/maven-metadata-local.xml, and also_remote.repositories*files.central-publishing-maven-plugin0.11.0 (the latest version) deletes onlymaven-metadata-central-staging.xmlbefore it makes the bundle. So the metadata file stays in a directory without a.pom. I reproduced both layouts locally with Maven 3.10.0 and 3.9.16.The rerun (attempt 2) failed for a second reason. Attempt 1 had already uploaded 7.5.1 to GitHub Packages, so the rerun got
HTTP Status: 409and stopped before the Central step.Change
jni/mvnw, script only) that pins Maven 3.9.16 with a SHA-256 checksum. All threemvncalls inmaven.ymluse it.Recovery for 7.5.0 and 7.5.1
A rerun of the release runs uses the workflow file at the tag, so a rerun cannot use this fix. After this merges, dispatch
maven.ymlon main withversion=7.5.1(and7.5.0if we want it).jni/is the same on main and atv7.5.1.