-
Notifications
You must be signed in to change notification settings - Fork 440
Description
Picocli already offers support for Graal integration with the ReflectionConfigGenerator
, ResourceConfigGenerator
, and DynamicProxyConfigGenerator
tools in the picocli-codegen module.
This ticket is to improve that to allow picocli-based applications to generate Graal configuration files automatically during the build, and embed the generated files in the client jar so that no command line configuration is needed when creating a native image.
ReflectionConfigGeneratorProcessor
This is a subclass of the generic picocli annotation processor (#500).
It invokes the ReflectionConfigGenerator
tool with the CommandSpec
derived from the annotations at compile time.
By default it generates a config file in this location:
$CLASS_OUTPUT/META-INF/native-image/picocli-generated/reflect-config.json
This may be controlled by specifying processor options groupId
and artifactId
. For example, specifying "-AgroupId=example", "-AartifactId=full"
will result in the file location to become:
$CLASS_OUTPUT/META-INF/native-image/example/full/picocli-generated/reflect-config.json
(JCommander users looking for Graal support: give this a try!)