Skip to content

ci(nix): publish the Java SDK from the development shell - #51

Open
Joibel wants to merge 1 commit into
tb-ufbi.4-pr4from
tb-ufbi.6-pr6
Open

ci(nix): publish the Java SDK from the development shell#51
Joibel wants to merge 1 commit into
tb-ufbi.4-pr4from
tb-ufbi.6-pr6

Conversation

@Joibel

@Joibel Joibel commented Jul 30, 2026

Copy link
Copy Markdown
Owner

Based on PR #49

Chain of upstream PRs as of 2026-07-30

Fixes #TODO

Motivation

Modifications

Verification

Documentation

AI

🤖 Generated with Claude Code

https://claude.ai/code/session_01H871PuNyYPzjmpUhXCRXGA

@Joibel Joibel self-assigned this Jul 30, 2026
Publishing the Java client was the last thing still reaching for Docker to
get a toolchain: `maven:3-openjdk-8`, with the host's ~/.m2 bind-mounted in
and `-Duser.home` pointing at it. That pinned Maven to whatever `3` resolved
to on the day, pinned the JDK to a version that went end-of-life in 2019, and
meant the release job could only run somewhere with a Docker daemon.

Maven comes from the flake instead, on the same JDK the shell already
provides for the generator, and the job runs `nix develop --command make
--directory sdks/java publish`. The `install` and `test` targets already
called `mvn` directly, so they now pick up the shell's Maven too rather than
building the client with different tools than the published artifact.

The client is compiled for Java 8 consumers, and the generated POM asks for
that with `source`/`target` 1.8. Under a JDK 8 those meant "compile against
the Java 8 API"; under a current JDK they only set the bytecode version and
would happily link a modern API into a Java 8 class file. `publish` therefore
passes `maven.compiler.release=8`, which restores the original guarantee.
`install` and `test` do not, because CI still runs those on a JDK of its own
choosing and `release` needs a JDK 9 or newer.

Generation is unaffected by the move: `make --directory sdks/java generate`
in the shell reproduces the checked-in client byte-for-byte, and the compiled
classes are still major version 52.

The copy of settings.xml into the work directory goes away, since Maven is no
longer run from inside it, and so does PYPI_API_TOKEN: the Python SDK was
removed in 4.0 and the matrix has only ever built Java since.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UfBK3mQcTNEBEGpXu4hzCY
Signed-off-by: Alan Clucas <alan@clucas.org>
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