Skip to content

Java: Make jedis-compatibility a pure-Java JAR with no-classifier support#5649

Merged
affonsov merged 7 commits into
mainfrom
affonsov/jedis-uber-jar
Apr 28, 2026
Merged

Java: Make jedis-compatibility a pure-Java JAR with no-classifier support#5649
affonsov merged 7 commits into
mainfrom
affonsov/jedis-uber-jar

Conversation

@affonsov
Copy link
Copy Markdown
Collaborator

@affonsov affonsov commented Mar 23, 2026

Summary

Make valkey-glide-jedis-compatibility a pure-Java JAR by removing native library bundling, and publish a no-classifier variant so users no longer need to specify a platform classifier.

Issue link

This Pull Request is linked to issue:
Closes <Issue #>

Features / Behaviour Changes

Before: Users had to specify a platform classifier when depending on valkey-glide-jedis-compatibility:

<classifier>linux-x86_64</classifier>

After: No classifier needed. The uber JAR is resolved transitively via the POM:

<dependency>
    <groupId>io.valkey</groupId>
    <artifactId>valkey-glide-jedis-compatibility</artifactId>
    <version>2.3.0</version>
</dependency>

Implementation

java/jedis-compatibility/build.gradle:

  • Removed the copyNativeLib task and all its dependsOn references — the JAR no longer bundles native libraries
  • Added JEDIS_NO_CLASSIFIER_BUILD env var support to the jar block:
    • "true" → no classifier (for the new no-classifier JAR)
    • Otherwise → existing classifier logic (musl or osdetector)

.github/workflows/java-cd.yml:

  • Added 3 steps to the create-uber-jar job:
    1. Build jedis-compatibility with JEDIS_NO_CLASSIFIER_BUILD=true (skips Rust, reuses already-compiled client)
    2. Bundle the Maven local output into jedis-bundle-no-classifier.jar
    3. Upload as jedis-no-classifier artifact
  • The publish job needs no changes — existing glob patterns pick up the new artifact automatically

Limitations

  • Classifier JARs are still published during the transition period (they now contain pure Java, same as the no-classifier JAR)
  • Users who exclude the transitive valkey-glide dependency will get UnsatisfiedLinkError at runtime

Testing

  • YAML syntax validated for java-cd.yml
  • Verified publish job glob patterns handle the new artifact
  • Verified POM consistency across classifier and no-classifier builds

Checklist

Before submitting the PR make sure the following are checked:

  • This Pull Request is related to one issue.
  • Commit message has a detailed description of what changed and why.
  • Tests are added or updated.
  • CHANGELOG.md and documentation files are updated.
  • Linters have been run (make *-lint targets) and Prettier has been run (make prettier-fix).
  • Destination branch is correct - main or release
  • Create merge commit if merging release branch into main, squash otherwise.

Comment thread java/jedis-compatibility/build.gradle Outdated
@yipin-chen yipin-chen mentioned this pull request Apr 22, 2026
10 tasks
@affonsov affonsov force-pushed the affonsov/jedis-uber-jar branch from ba3f62c to f1aa389 Compare April 23, 2026 23:00
@affonsov affonsov changed the title Java: Jedis distribution with valkey-glide uber jar Java: Make jedis-compatibility a pure-Java JAR with no-classifier support Apr 23, 2026
@affonsov affonsov force-pushed the affonsov/jedis-uber-jar branch from f1aa389 to 7eaa9e2 Compare April 23, 2026 23:07
Comment thread .github/workflows/java-cd.yml Outdated
@yipin-chen yipin-chen added this to the 2.4 milestone Apr 24, 2026
@affonsov affonsov force-pushed the affonsov/jedis-uber-jar branch from 09276bb to ffb51bf Compare April 24, 2026 23:23
- Add native library staging step for jedis-compatibility uber JAR in CI workflow
- Organize platform-specific native libraries from downloaded artifacts into staging directory
- Update gradle build to publish jedis-compatibility uber JAR to Maven local
- Add bundling step to package jedis-compatibility uber JAR alongside client uber JAR
- Update artifact upload to include both client and jedis-compatibility uber JARs
- Modify jedis-compatibility build.gradle to support uber JAR builds with mavenLocal resolution
- Add conditional dependency resolution: use published Maven artifact for uber builds, project dependency for local/per-platform builds
- Implement copyAllNativeLibs task to bundle all platform native libraries from CI staging directory
- Add conditional task dependencies to skip per-platform native lib copy and Rust build during uber JAR builds
- Enables platform-independent uber JAR distribution for jedis-compatibility module

Signed-off-by: affonsov <67347924+affonsov@users.noreply.github.com>
- Merge separate native library staging steps into single unified step
- Stage native libraries to both client and jedis-compatibility modules

Signed-off-by: affonsov <67347924+affonsov@users.noreply.github.com>
This reverts commit 9989765.

Signed-off-by: affonsov <67347924+affonsov@users.noreply.github.com>
This reverts commit 88cfa57.

Signed-off-by: affonsov <67347924+affonsov@users.noreply.github.com>
…port

Remove native library bundling from jedis-compatibility and add
JEDIS_NO_CLASSIFIER_BUILD env var to control classifier output.
Extend create-uber-jar CI job to build, bundle, and upload a
no-classifier jedis-compatibility JAR alongside existing classifier
variants.

Signed-off-by: affonsov <67347924+affonsov@users.noreply.github.com>
- Update GPG signing key ring file path from jedis-compatibility/secring.gpg to secring.gpg in CI workflow
- Add explicit jar packaging declaration to Maven POM configuration
- Align publishing paths with project structure for consistent artifact generation

Signed-off-by: affonsov <67347924+affonsov@users.noreply.github.com>
@affonsov affonsov force-pushed the affonsov/jedis-uber-jar branch from ffb51bf to ba2d855 Compare April 24, 2026 23:39
- Replace published Maven artifact dependency with direct project dependency
- Remove classifier-based artifact resolution for jedis-compatibility
- Eliminate unnecessary publishToMavenLocal tasks from build pipeline
- Simplify test compilation and execution dependency chain
- Update comment to reflect direct project resolution approach

Signed-off-by: affonsov <67347924+affonsov@users.noreply.github.com>
@affonsov affonsov merged commit 863a8ef into main Apr 28, 2026
55 of 57 checks passed
@affonsov affonsov deleted the affonsov/jedis-uber-jar branch April 28, 2026 21:09
affonsov added a commit that referenced this pull request Apr 28, 2026
…port (#5649)

Java: Make jedis-compatibility a pure-Java JAR with no-classifier support

Make valkey-glide-jedis-compatibility a pure-Java JAR by removing native library bundling, and publish a no-classifier variant so users no longer need to specify a platform classifier.

Signed-off-by: affonsov <67347924+affonsov@users.noreply.github.com>
affonsov added a commit that referenced this pull request Apr 28, 2026
…port (Cherry-pick #5649) (#5845)

Java: Make jedis-compatibility a pure-Java JAR with no-classifier support (#5649)

Java: Make jedis-compatibility a pure-Java JAR with no-classifier support

Make valkey-glide-jedis-compatibility a pure-Java JAR by removing native library bundling, and publish a no-classifier variant so users no longer need to specify a platform classifier.

Signed-off-by: affonsov <67347924+affonsov@users.noreply.github.com>
xShinnRyuu pushed a commit that referenced this pull request May 2, 2026
…port (#5649)

Java: Make jedis-compatibility a pure-Java JAR with no-classifier support

Make valkey-glide-jedis-compatibility a pure-Java JAR by removing native library bundling, and publish a no-classifier variant so users no longer need to specify a platform classifier.

Signed-off-by: affonsov <67347924+affonsov@users.noreply.github.com>
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.

4 participants