Skip to content

Commit 1c90ff8

Browse files
manusaclaude
andauthored
fix(ci): use lax checksums for snapshot deploy step
Remote SNAPSHOT metadata (maven-metadata.xml) on the Sonatype server can have persistent checksum inconsistencies. The -C (strict checksums) flag in MAVEN_ARGS makes these fatal. Adding -c (lax checksums) to the deploy step overrides this, allowing the build to warn and continue instead of failing. Also reverts the split deploy (separate BOM invocation) since lax checksums makes it unnecessary. Co-Authored-By: Claude Opus 4.6 <[email protected]> Signed-off-by: Marc Nuri <[email protected]>
1 parent 921fbfc commit 1c90ff8

2 files changed

Lines changed: 9 additions & 12 deletions

File tree

.github/workflows/release-snapshots.yaml

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -60,12 +60,9 @@ jobs:
6060
run: ./mvnw ${MAVEN_ARGS} clean install -pl bom-generator-plugin
6161
- name: Generate BOM
6262
run: ./mvnw ${MAVEN_ARGS} -Pbom clean validate
63-
# BOMs are deployed separately to avoid SNAPSHOT metadata checksum errors.
64-
# The central-publishing-maven-plugin deploys each module individually for SNAPSHOTs.
65-
# If BOMs deploy in the same reactor, they may fetch metadata for artifacts that were
66-
# just deployed, hitting a brief server-side inconsistency window between the
67-
# maven-metadata.xml and its checksum file.
63+
# Deploy uses -c (lax checksums) to override -C (strict) from MAVEN_ARGS.
64+
# Remote SNAPSHOT metadata on the Sonatype server can have persistent or transient
65+
# checksum inconsistencies (maven-metadata.xml vs its .sha1 file). Strict checksums
66+
# make these fatal; lax checksums warn and continue.
6867
- name: Build and release Java modules
69-
run: ./mvnw ${MAVEN_ARGS} ${RELEASE_MAVEN_ARGS} deploy -pl '!target/classes/kubernetes-client-bom,!target/classes/kubernetes-client-bom-with-deps'
70-
- name: Deploy BOMs
71-
run: ./mvnw ${MAVEN_ARGS} ${RELEASE_MAVEN_ARGS} deploy -pl target/classes/kubernetes-client-bom,target/classes/kubernetes-client-bom-with-deps
68+
run: ./mvnw ${MAVEN_ARGS} ${RELEASE_MAVEN_ARGS} -c deploy

bom-generator-plugin/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -144,10 +144,10 @@ mvn -Prelease deploy
144144
### SNAPSHOT deployment
145145

146146
For SNAPSHOT deployments, the `central-publishing-maven-plugin` deploys each module
147-
individually (unlike releases, which are bundled). BOMs must be deployed in a separate
148-
Maven invocation to avoid checksum validation errors caused by the server-side metadata
149-
inconsistency window for recently deployed SNAPSHOT artifacts. See the
150-
`release-snapshots.yaml` workflow for the exact commands.
147+
individually (unlike releases, which are bundled). Remote SNAPSHOT metadata on the
148+
Sonatype server can have checksum inconsistencies (`maven-metadata.xml` vs its `.sha1`
149+
file), so the deploy step must use lax checksums (`-c`) instead of strict (`-C`).
150+
See the `release-snapshots.yaml` workflow for the exact commands.
151151

152152
## Generated BOM Content
153153

0 commit comments

Comments
 (0)