Separate modules to be forked by the cli to handle things that are too expensive to be bundled with native-image (e.g. "https").
It shall be invoked with java -jar
and not require classpath, either self-contained code or a standalone JAR (e.g. shaded).
The JAR file is embedded as a resource in the native CLI binary.
NOTE: Proxy has to be propagated to the forked JVM properly.
The JAR file is conditionally extracted into the user directory.
~/.helidon/extension/
|- version
|- cli-ext.jar
Both of these files are resources bundled in the native CLI binary.
Takes a version string and populates ~/.helidon/cache
.
Supports:
- version
- base URL
- cache location
- verbosity level
- First, check the cache for the need for update.
- If need to update, check the extension JAR file and set it up
- Invoke the extension (i.e fork
java -jar cli-ext.jar update-cache
)
Log messages are emitted on standard out using the style syntax $(red text)
, however it does not use the special utility.
System.out.println
is used and the native-code processes the output from the forked JVM and passes it to the ANSI aware logger.
Mainly two kinds of errors:
- Network error
- Timeout
We simply EXIT code 0 and 1 to indicate success or failure.