-
1. Re: How to extend CLI with custom commands?
ctomc Jul 11, 2016 4:57 AM (in response to fthiel)1 of 1 people found this helpfulWhat exactly does you CLI extension do? Is it a server side command? aka something does work on some subsystems.
or actual high level command addon in CLI?
As for CLI extensions go, you don't need to register them in standalone-*.xml files as there is where subsystems go.
You do not deploy them as deployments, but you just need to make sure that CLI class loader sees the classes that is about it.
-
2. Re: How to extend CLI with custom commands?
fthiel Jul 11, 2016 10:50 AM (in response to ctomc)Tomaz Cerar schrieb:
...
You do not deploy them as deployments, but you just need to make sure that CLI class loader sees the classes that is about it.
This was a good hint and I found a solution that works for me. I just added the path to my JAR file to the resources in wildfly-10.0.0.Final\modules\system\layers\base\org\jboss\as\cli\main\module.xml and then I could use my the custom test command. When the CLI module is loaded all given resources in the module.xml are loaded, also my own classes, and they are found by initCommands() when called in the constructor of the CommandContextImpl class.
The CLI extension doesn't really do anything yet, I'm just evaluating if and how it works.
Thank You very much