Synopsis
gen-resource-config [-hV] [--[no-]exit] [-c=<factoryClass>] [-o=<outputFile>] [-b=<bundle-base-name>]… [-p=<resourceRegex>]… [@<filename>…] [<classes>…]
Description
Generates a JSON file with the resources and resource bundles to include in the native image.
The generated JSON file can be passed to the -H:ResourceConfigurationFiles=/path/to/resource-config.json
option of the native-image
GraalVM utility.
See https://www.graalvm.org/latest/reference-manual/native-image/dynamic-features/Resources/
Options
- -b, --bundle=<bundle-base-name>
-
Additional resource bundle(s) to be included in the image. This option may be specified multiple times with different regular expression patterns.
- -p, --pattern=<resourceRegex>
-
Java regexp that matches resource(s) to be included in the image. This option may be specified multiple times with different regular expression patterns.
- -c, --factory=<factoryClass>
-
Optionally specify the fully qualified class name of the custom factory to use to instantiate the command class. When omitted, the default picocli factory is used.
- -o, --output=<outputFile>
-
Output file to write the configuration to. If not specified, the configuration is written to the standard output stream.
- --[no-]exit
-
Specify
--exit
if you want the application to callSystem.exit
when finished. By default,System.exit
is not called. - -h, --help
-
Show this help message and exit.
- -V, --version
-
Print version information and exit.
Arguments
- [@<filename>…]
-
One or more argument files containing options.
- [<classes>…]
-
Zero or more
@Command
classes with a resource bundle to include in the image.
Exit Codes (if enabled with --exit
)
- 0
-
Successful program execution.
- 1
-
A runtime exception occurred while generating man pages.
- 2
-
Usage error: user input for the command was incorrect, e.g., the wrong number of arguments, a bad flag, a bad syntax in a parameter, etc.
Example
java -cp "myapp.jar;picocli-4.7.6.jar;picocli-codegen-4.7.6.jar" picocli.codegen.aot.graalvm.ResourceConfigGenerator my.pkg.MyClass