|
JSHELL : CLI Framework for Java Applications
UsageSteps to interface your application with the framework :
ConfigurationBelow is a sample configuration<jshell prompt="jshell2>"> <commandConfig> <name>test</name> <name>te</name> <command impl="net.sf.jshell.TestCommand" /> <options> <option name="v" longName="verbose1" optionType="boolean" description="some verbose option"/> <option name="s" longName="something" description="something really unknown!"/> </options> </commandConfig> All lines in the input that start with the words in the "name" element are delegated to the implementation provided in the corresponding "command" element. In the above case, any command line beginning with "te" or "test" will be parse and the parsed output will be used to invoke an instance of the class "net.sf.jshell.TestCommand". The command is configured with options "v" and "s". If the command is invoked with and option other than the ones configured, the command handler is not invoked. Command FormatsThe GNU command line format is assumed. Any command will have the following format - command -<option1 [option args]> -<option2 [option args]> [command args]The command options are not position sensitive. Any option should be prefixed with '-'. The option args should follow the corresponding option. Dependencies
The framework uses digester to parse the configuration file. This in turn results in a chain of dependencies. Below is the list
and the versions used in the build
Downloads
|