Closed damnms closed 1 year ago
You are likely missing metadata for that bundle:
https://www.graalvm.org/22.2/reference-manual/native-image/metadata/
i had the metadata repo in my build.gradle
Right, I still don't quite understand the request in this bug. What is minimize, how is it used, in which library?
minimize() is part of shadowJar, its a setting that can be used to minimize the produced jar my assumption(!) is, that graalvm also uses this in some sort (remove stuff that is required) because it was the same error. but its just a guess!
I don't understand this bug report either. shadow may have a minimize
function, but it's unrelated to this plugin. The GraalVM plugin may require additional metadata to run properly, such as reflection metadata or resources definition. Make sure to follow the information about autodectecting resources here for example.
this bug report should be clear. i had the metadata repo added and it DID NOT WORK. this is the bug. period.
my ASSUMPTION is that this plugin uses some "optimize/minimize" code functions that lead to this error which are more or less the same as in shadowjar's minimize, because i get the same error in shadowjar when i use minimize(). but again, its just a guess(!). i am not a developer of graalvm, so i cant know what code is used in the "optimize" functions. i am also not a shadowjar developer, so i also dont know what sort of "minimize()" logic they use in their plugin.
anyway, i give up. its frustrating and annoying to argue about bugs and then talk about stuff that is absolutely unrelated, but come to my mind or might be somehow related. i switched to jlink/jpackage. that works.
Adding the metadata repository will not make your application work if the metadata repository doesn't contain enough information about the libraries you are using. Its goal is to provide metadata for common dependencies, but if the issue comes from your application code, for example, it won't help. Similarly if the module that you are using is not providing metadata.
i tested it with 2 different jaxb implementations, both did not work. this was moxy and the glassfish jaxb impl.
Is your feature request related to a problem? Please describe. When i create a native-image, it creates a ~40mb file. Thats nice. But it does not run. I get:
the same error i get when i use minimize() in shadowJar So i assume, native-image calls that too. Please provide an option to disable that!
Describe the solution you'd like Add an option to disable minimize(), so i can run that native-image
Describe alternatives you've considered use the shadowJar
Additional context