FWIW, I use JCommander but it does not do complex and/or options. Gary
On Fri, Oct 14, 2016 at 3:35 AM, sebb <seb...@gmail.com> wrote: > On 14 October 2016 at 11:25, John Patrick <nhoj.patr...@gmail.com> wrote: > > Imaging your stand alone jar runs an embedded http server, by default > > it has a embedded testing certificate for the https listener. But in > > some environments you need to disable https and others you want to > > overwrite with values. > > > > So you have options, something like; > > [ A or [ B and C and [ D or E ] ] ] > > > > [ -no-https | [ -https-port <optional port> -keyStoreLocation > > <required.jks> [ -keyStorePassword <password> | > > -keyStorePassword-prompt ] ] ] > > > > -no-https > >> will explicitly disable https > > > > -https-port <optional port> > >> will explicitly enabled https and has and optional port parameter > >> if you specify -https-port you also need to explicitly specify the > keystore location and either the password on the command line or state it > will prompt via the console > > > > -keyStoreLocation <required.jks> > >> required if -https-port is specified and also has a required parameter > > > > -keyStorePassword <password> > > -keyStorePassword-prompt > >> only one of the above must be supplied, not both > >> if "-keyStorePassword" supplied then it has a required password property > >> if "keyStorePassword-prompt" supplied then it will request via the > console when booting > > > > I hope that is a clear example. This is something that I'm trying to > > implement at the moment but having to do several if/else if/else > > blocks to get it working as needed. > > Seems like a good idea. > > You could implement most of your example by use of > > A not B, C, D, E > B and C > D not E > > However one would need to group D not E to add > > B and DnotE > > That should give the behaviour you require with only a single group, > but you could combine them for simplicity. > > I think the dormant/retired Avalon CLI implemented AND or NOT. > The version in JMeter implements both AND and NOT IIRC. > > > > Cheers, > > John > > > > > > > > On 14 October 2016 at 00:26, Gilles <gil...@harfang.homelinux.org> > wrote: > >> Hi. > >> > >> On Thu, 13 Oct 2016 15:57:00 +0100, John Patrick wrote: > >>> > >>> I've posted a message to the users list, but on reflecting I think > >>> what I'm trying to achieve might be beyond commons-cli current > >>> ability. > >>> > >>> If I fork and work on adding nested OptionGroup's, would it stand a > >>> change of being merged? > >>> Is it a feature you want to support/provide? > >> > >> > >> Please describe what you propose in more details. > >> > >>> > >>> I want to check with dev's before wasting time on the potential > feature... > >> > >> > >> Good precaution, indeed... > >> > >> Regards, > >> Gilles > >> > >>> > >>> cheers, > >>> John > >>> > >> > >> > >> --------------------------------------------------------------------- > >> To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org > >> For additional commands, e-mail: dev-h...@commons.apache.org > >> > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org > > For additional commands, e-mail: dev-h...@commons.apache.org > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org > For additional commands, e-mail: dev-h...@commons.apache.org > > -- E-Mail: garydgreg...@gmail.com | ggreg...@apache.org Java Persistence with Hibernate, Second Edition <https://www.amazon.com/gp/product/1617290459/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&linkCode=as2&tag=garygregory-20&linkId=cadb800f39946ec62ea2b1af9fe6a2b8> <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1617290459> JUnit in Action, Second Edition <https://www.amazon.com/gp/product/1935182021/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&linkCode=as2&tag=garygregory-20&linkId=31ecd1f6b6d1eaf8886ac902a24de418%22> <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1935182021> Spring Batch in Action <https://www.amazon.com/gp/product/1935182951/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%7Blink_id%7D%7D%22%3ESpring+Batch+in+Action> <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1935182951> Blog: http://garygregory.wordpress.com Home: http://garygregory.com/ Tweet! http://twitter.com/GaryGregory