Skip to content

ci: build the Java release pom in CI, and fix its jar execution - #128

Merged
cloudsmith-iduffy merged 1 commit into
masterfrom
ci/test-java-release-pom
Oct 12, 2026
Merged

cloudsmith-iduffy merged 1 commit into
masterfrom
ci/test-java-release-pom

Conversation

@cloudsmith-iduffy

Copy link
Copy Markdown
Contributor

Unblocks #127.

Problem

bindings/java/build.sh copies bindings/java/release/pom.xml over the generated pom. Dependabot updates the release pom. But CI ran mvn test against the generated bindings/java/src/pom.xml, so:

Change

  • bindings/java/test.sh writes the release pom with the package version to src/.release-pom.xml. It runs mvn test and then mvn -DskipTests package against it, and deletes the file on exit. The package phase builds the main, javadoc, sources and tests jars that deploy.sh uploads.
  • write_release_pom in scripts/common.sh holds the copy, so build.sh and test.sh produce the same pom.
  • release/pom.xml: the custom jar execution now runs only test-jar. Maven's default execution already builds the main jar, and maven-jar-plugin 3.x refuses to build it twice.

Verification

On cimg/openjdk with the new test.sh:

Release pom JDK Result
#127, without the fix 8 fails at maven-jar-plugin:3.5.1:jar (the new test catches it)
master 8 passes, 4 jars
master + fix 8 passes, 4 jars
#127 + fix 8, 21, 25 passes, 4 jars

The generated src/pom.xml does not change here. The next "Update API bindings" run copies the release pom into it, with #126's plugin versions, and bumps the version.

After this merges, comment @dependabot rebase on #127 so that its CI runs the new test.

🤖 Generated with Claude Code

The Java build copies bindings/java/release/pom.xml over the generated
pom, but CI built the generated pom. Dependabot updates to the release
pom were merged without a build, and a maven-jar-plugin 3.x update
would break the deploy build.

Make bindings/java/test.sh build the release pom with the package
version, and run the package phase that deploy.sh uses. Move the copy
into write_release_pom in scripts/common.sh, so the build and the tests
use the same pom.

Remove the duplicate jar goal from the jar execution. Maven already
builds the main jar, and maven-jar-plugin 3.x rejects the second one.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings October 12, 2026 19:56
@cloudsmith-iduffy
cloudsmith-iduffy merged commit 4042340 into master Oct 12, 2026
20 checks passed

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The changes consistently exercise the deploy configuration and resolve the Maven 3.x JAR conflict.

0 open findings

What changed in this PR

Updates Java CI to validate the maintained release POM and its deployable artifacts.

Changes:

  • Shares release POM version generation between build and test scripts.
  • Runs Java tests and package creation against the release POM.
  • Prevents duplicate main JAR creation.
File Description
scripts/​common.sh Adds shared release POM generation.
bindings/​java/​test.sh Tests and packages using the release POM.
bindings/​java/​release/​pom.xml Removes duplicate main JAR execution.
bindings/​java/​build.sh Uses the shared POM helper.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@cloudsmith-iduffy
cloudsmith-iduffy deleted the ci/test-java-release-pom branch October 12, 2026 19:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants