Summary
The native-osx-aarch64 and native-osx-x86_64 artifacts published to Maven Central for v1.21.0 are missing the native libbrotli.dylib files. This causes an UnsatisfiedLinkError at runtime on macOS.
Steps to Reproduce
- Upgrade from Brotli4j 1.20.0 to 1.21.0
- Attempt to use Brotli compression/decompression on macOS (both x86_64 and aarch64)
Error
java.lang.UnsatisfiedLinkError: Failed to load Brotli native library Caused by: java.lang.UnsatisfiedLinkError: Failed to find Brotli native library in classpath: /lib/osx-aarch64/libbrotli.dylib
Analysis
I downloaded and inspected the published JARs from Maven Central. The macOS native libraries are missing from v1.21.0 while they were present in v1.20.0:
| Artifact |
v1.20.0 |
v1.21.0 |
native-linux-x86_64 |
✅ libbrotli.so present |
✅ libbrotli.so present |
native-linux-aarch64 |
✅ libbrotli.so present |
✅ libbrotli.so present |
native-osx-x86_64 |
✅ libbrotli.dylib present |
❌ missing |
native-osx-aarch64 |
✅ libbrotli.dylib present |
❌ missing |
native-windows-x86_64 |
✅ brotli.dll present |
✅ brotli.dll present |
native-windows-aarch64 |
✅ brotli.dll present |
✅ brotli.dll present |
For example, listing the contents of native-osx-aarch64-1.21.0.jar shows no lib/ directory at all:
META-INF/ META-INF/MANIFEST.MF com/aayushatharva/brotli4j/macos/aarch64/NativeLoader.class META-INF/maven/com.aayushatharva.brotli4j/native-osx-aarch64/pom.xml META-INF/maven/com.aayushatharva.brotli4j/native-osx-aarch64/pom.properties META-INF/versions/9/module-info.class
Whereas native-osx-aarch64-1.20.0.jar correctly contains:
lib/osx-aarch64/libbrotli.dylib
Suspected Cause
The release CI pipeline was restructured in v1.21.0 (#228, #245). The previous approach merged all platform build artifacts into a single directory and deployed from there. The new approach copies individual target/ directories back into the checkout and deploys from the repo root. The macOS artifact copy step may have failed silently — likely because macos-latest now runs on Apple Silicon (aarch64), which may affect where the native build output ends up relative to what the release job expects to copy.
Environment
- Brotli4j version: 1.21.0
- Platform: macOS (both aarch64 and x86_64 affected)
- JDK: 21 (Zulu)
Summary
The
native-osx-aarch64andnative-osx-x86_64artifacts published to Maven Central for v1.21.0 are missing the nativelibbrotli.dylibfiles. This causes anUnsatisfiedLinkErrorat runtime on macOS.Steps to Reproduce
Error
Analysis
I downloaded and inspected the published JARs from Maven Central. The macOS native libraries are missing from v1.21.0 while they were present in v1.20.0:
native-linux-x86_64libbrotli.sopresentlibbrotli.sopresentnative-linux-aarch64libbrotli.sopresentlibbrotli.sopresentnative-osx-x86_64libbrotli.dylibpresentnative-osx-aarch64libbrotli.dylibpresentnative-windows-x86_64brotli.dllpresentbrotli.dllpresentnative-windows-aarch64brotli.dllpresentbrotli.dllpresentFor example, listing the contents of
native-osx-aarch64-1.21.0.jarshows nolib/directory at all:Whereas
native-osx-aarch64-1.20.0.jarcorrectly contains:Suspected Cause
The release CI pipeline was restructured in v1.21.0 (#228, #245). The previous approach merged all platform build artifacts into a single directory and deployed from there. The new approach copies individual
target/directories back into the checkout and deploys from the repo root. The macOS artifact copy step may have failed silently — likely becausemacos-latestnow runs on Apple Silicon (aarch64), which may affect where the native build output ends up relative to what the release job expects to copy.Environment