You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So there are some classes which are accessed via reflections and / or serialized. Also if static resources files are used from classpath they also need to be included ( example: JodaOrg/joda-time#784 ) If you don’t provide those hints it causes issues during runtime when using native-images with GraalVM. From what I tested IOException was used via reflections.
There is nothing wrong with JGit, but it requires some meta information files so that there are no issues with native-image. 😀
I created this ticket to check if reflection / serialization / static resources are used and to add those hints.
With my workaround mentioned in the description JGit is working without any issues in native images. 👍
Note: You can provide separate file for reflection / serialization / resources - the Spring Boot team documented it with my request: spring-projects/spring-boot#42515
Description
Because we want to use jgit in GraalVM native images it would be great if this could be achieved through this ticket.
Motivation
jgit in GraalVM native images.
Alternatives considered
N/A
Additional context
N/A
Spring Boot Workaround
Before the
native-image
command is used you have to set the environment varialbesImportant: this is not a good solution as it enables all jgit classes for reflections and serialization.
An example of a native build can be found here: https://github.com/klopfdreh/native-cloud-config-test/blob/main/client/Dockerfile (Note: This does not use builder-image with multi stage and is only an example)
The text was updated successfully, but these errors were encountered: