Re: [commons-cli] handling properties files as default . . .
I’m under the impression that Commons-CLI is not under active development any more (anyone on the list, feel free to correct me if I’m wrong). I would recommend that you take a look at picocli (https://github.com/remkop/picocli). Disclosure: I’m the author.) Picocli has a pluggable default provider (https://picocli.info/#_default_provider), so it should be fairly straightforward to implement what you describe. It also has other nice features that you might be interested in, like usage help with ANSI colors, autocompletion, support for subcommands and much more. Please take a look. Happy to help if any issues pop up. Remko. (Shameless plug) Every java main() method deserves http://picocli.info > On Feb 10, 2019, at 10:05, Albretch Mueller wrote: > > of course, the properties file would be the one describing the data, > even if the command line arguments would take precedence > > lbrtchx > > - > To unsubscribe, e-mail: user-unsubscr...@commons.apache.org > For additional commands, e-mail: user-h...@commons.apache.org >
Re: [commons-cli] handling properties files as default . . .
of course, the properties file would be the one describing the data, even if the command line arguments would take precedence lbrtchx - To unsubscribe, e-mail: user-unsubscr...@commons.apache.org For additional commands, e-mail: user-h...@commons.apache.org
[commons-cli] handling properties files as default . . .
I was looking into commons-cli, but could not find a few features which I very much need, basically: 1) there should be a way to use a default properties file in a well known location (right in "user.dir") 2) that property file should include as part of their metadata (easiest, right in its name) the encoding used to read the name-value pairs of properties included in it 3) if user wants she can enter cli parameters in the command line explicitly and those values would take precedence over the ones in the properties file 4) user should get a name-value(s) hashmap. if there is a parameter for which no value is defined (just the name says it all) the value would be set to null (user should then deal with the data herself) 5) the encoding of the properties file and cli would be based on the metasyntax notations used by the extended Backus Naur form (ISO/IEC 14977) https://en.wikipedia.org/wiki/Extended_Backus–Naur_form commons-cli doesn’t seem to be it. Do you know of such a thing (or a similar one)? lbrtchx - To unsubscribe, e-mail: user-unsubscr...@commons.apache.org For additional commands, e-mail: user-h...@commons.apache.org