Skip to content

fix: add Multi-Release manifest attribute to shaded JARs for GraalVM/Truffle support - #3487

Merged
robfrank merged 1 commit into
mainfrom
fix/jsfuncions-thruffle
Feb 20, 2026
Merged

fix: add Multi-Release manifest attribute to shaded JARs for GraalVM/Truffle support#3487
robfrank merged 1 commit into
mainfrom
fix/jsfuncions-thruffle

Conversation

@robfrank

Copy link
Copy Markdown
Collaborator

GraalVM/Truffle JARs are transitively included in protocol module shaded JARs (e.g. gremlin via arcadedb-integration -> arcadedb-engine -> GraalVM). The maven-shade-plugin strips the Multi-Release: true manifest attribute, causing Truffle's CheckMultiReleaseSupport check to use the base class (returns false) instead of the Java-9+ versioned class (returns true).

Since shaded JARs sort alphabetically before the individual truffle-api and polyglot JARs, the JVM always loaded the broken version first, resulting in Engine$ImplHolder initialization failure.

Fix: add ManifestResourceTransformer with Multi-Release: true to the parent pom shade plugin configuration, as recommended by the GraalVM documentation for Uber/shaded JAR setups.

…Truffle support

GraalVM/Truffle JARs are transitively included in protocol module shaded JARs
(e.g. gremlin via arcadedb-integration -> arcadedb-engine -> GraalVM). The
maven-shade-plugin strips the Multi-Release: true manifest attribute, causing
Truffle's CheckMultiReleaseSupport check to use the base class (returns false)
instead of the Java-9+ versioned class (returns true).

Since shaded JARs sort alphabetically before the individual truffle-api and
polyglot JARs, the JVM always loaded the broken version first, resulting in
Engine$ImplHolder initialization failure.

Fix: add ManifestResourceTransformer with Multi-Release: true to the parent
pom shade plugin configuration, as recommended by the GraalVM documentation
for Uber/shaded JAR setups.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>