slachiewicz opened a new pull request, #1827: URL: https://github.com/apache/maven-mvnd/pull/1827
The native client depended on all of `maven-embedder`, but only uses `maven-logging` and `maven-jline`. Its runtime classpath drops from 68 to 20 artifacts, so `native-image` analyses less and stops applying reachability metadata for libraries the client never loads. `maven-cli` stays `provided` for the JDK fallback `DefaultClient`, which runs from the distribution's `mvn/lib`. `jline-native` registers its JNI library for all 17 platforms, about 657 kB in total. A new `-H:ExcludeResources` argument keeps only the target platform's library, which saves 543 kB (Windows x64) to 659 kB (Linux x64) per binary. An unrecognised platform keeps all of them. `jline-native` is now in dependency management. Without it, Maven 4 resolves it to 4.4.5 through `maven-jline`, next to `jline-terminal` 4.4.7. Verified: `./mvnw -Pnative package -pl client -am` with Oracle GraalVM 25 on macOS arm64 → `strings target/mvnd` lists only `org/jline/nativ/Mac/arm64/libjlinenative.jnilib`. The `mvnd-1.x` client is built against the Maven 3 embedder and needs a separate change. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
