Repository navigation
Fix jreleaserDeploy JGit conflict and dry-run it in CI - #1728
Conversation
Spotless 8.x pulls JGit 7 onto the plugin classpath, while JReleaser 1.26.0 is built against JGit 5.13. jreleaserDeploy then fails with NoClassDefFoundError: org/eclipse/jgit/lib/GpgObjectSigner (removed in JGit 7), so a release cannot publish. Force JGit 5.13 on the buildscript classpath until JReleaser supports JGit 7; spotlessCheck passes with it. CI never ran jreleaserDeploy, so this went unnoticed. Add a step that runs publish + jreleaserDeploy --dryrun with a throwaway GPG key and dummy credentials on one matrix entry.
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
JGit classpath compatibility build.gradle |
A buildscript classpath resolution rule pins org.eclipse.jgit:org.eclipse.jgit to version 5.13.5.202508271544-r. The comments describe a JReleaser and Spotless compatibility issue involving JGit 7. |
CI release dry run .github/workflows/gradle.yml |
An Ubuntu/Java 25 workflow step creates temporary signing-key files and runs the pre-deploy publication and JReleaser deploy tasks with dummy credentials and release dry-run flags. |
Estimated code review effort: 2 (Simple) | ~10 minutes
Change: Bug fix
Possibly related PRs
- minio/minio-java#1727: This PR upgrades Spotless and addresses the same JGit classpath compatibility issue.
Suggested reviewers: balamurugana
Merge Risk: 
Minimal · up to e76af
-
The change pins the build's JGit dependency and adds release dry-run validation. No concrete merge-blocking issue remains; merge after normal checks pass.
Pre-merge checks: 
5
-
Full details: Docstring Coverage
-
Explanation
No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 0 files. (2 skipped: 2 unsupported.)
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
A rabbit checks the build at dawn
While keys appear, then soon are gone
A dry-run hops through tasks in line
JGit stays pinned at version five
The release path is checked, not sent
The rabbit rests, its work well spent
Comment @coderabbitai help to get the list of available commands.
Summary
jreleaserDeployis broken on master, so 9.0.4 can't be published. It fails before any network call:JReleaser 1.26.0 (the latest release) is built against JGit 5.13. Since #1727, Spotless 8.10.4 pulls JGit 7.8 onto the same plugin classpath, Gradle resolves to 7.8, and
GpgObjectSignerno longer exists in JGit 7:The pin affects only the build's plugin classpath. Published artifacts and POMs don't change. Spotless 8 works with JGit 5.13 here: this build doesn't use
ratchetFrom, andspotlessCheckpasses. Remove the pin once JReleaser supports JGit 7.CI never ran
jreleaserDeploy, which is why #1727 passed CI. This PR adds a step on the Ubuntu / Java 25 job that runspublishMinioJavaPublicationToPreDeployRepository jreleaserDeploy --dryrun -Prelease. It uses a throwaway GPG key and dummy Sonatype credentials, and--dryrunskips every remote operation. The step adds about 50 s, mostly JReleaser checking whether the throwaway key is on public keyservers. That check only warns.Evidence
I reproduced the CI job in an Ubuntu 24.04 container with JDK 25:
./gradlew build,./gradlew build -Prelease, then the new step script, extracted fromgradle.ymland run underbash -eo pipefail.> org/eclipse/jgit/lib/GpgObjectSigner,BUILD FAILED, exit 1.After (this PR): both builds pass, then the step passes:
Merge Danger
Door: two-way
Blast Radius: build-only
The only changes are a build-classpath pin and one CI step. If a future Spotless release needs a JGit 7-only API,
spotlessCheckwill fail loudly and the pin must be revisited.Summary by CodeRabbit