Closed nreid260 closed 2 months ago
It looks like this configuration file is recommended and not mandatory.
Also, looking at the documentation, I am not sure that picocli can provide many of the values to be configured. Which values can be autogenerated by the annotation processor? It seems that many values require human decision-making, or am I missing something?
It's possible to specify the -H:ReflectionConfigurationResources
, -H:ResourceConfigurationResources
, and -H:DynamicProxyConfigurationResources
flags, which correspond to the existing generators.
I agree this file might not be necessary. I honestly can't tell from the Graal docs. I think the existing file names are auto-detected by native-image
, but https://www.graalvm.org/latest/reference-manual/native-image/overview/BuildConfiguration/ says nothing about that. Minimally, generating a native-image.properties
would clarify.
I filed this after spending several hours guessing why native-image
was ignoring the generated config files. But that seems to be an unrelated bug in the tool about the JAR format (maybe zip64?).
Sorry for the long silence.
Looking at the documentation, the native-image.properties
file is optional. It is recommended, but not required.
I prefer not to generate a native-image.properties
file, and instead keep the current behaviour, which is to generate config files under META-INF/native-image/
.
You mentioned you were experiencing issues where native-image
was ignoring the generated config files.
Have you been able to resolve that, and was that caused by picocli?
I have confirmed the issue was https://github.com/oracle/graal/issues/8500
Excellent, thank you for the confirmation!
According to the
native-image
docs at https://www.graalvm.org/latest/reference-manual/native-image/overview/BuildConfiguration/, anative-image.properties
file is needed to inform the tool about config files underMETA-INF/native-image
.picocli-codegen
generates config files, but not thenative-image.properties
.