commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Neidhart <thomas.neidh...@gmail.com>
Subject Re: [CLI] OptionGroup Broken?
Date Sat, 19 Jan 2013 14:57:39 GMT
On 01/18/2013 05:14 PM, William Speirs wrote:
> I'm trying to use OptionGroup to mutually exclude arguments, and it seems
> to be broken. I've setup --ip-address & --hostname as options in a single
> group, then provide both on the "command line" and would expect the parser
> to throw an AlreadySelectedException, but it doesn't... it happily parses
> both. Should I raise a JIRA issue for this, or am I totally missing
> something?

Hi Bill,

just tested it with the latest trunk and I receive the following exception:

org.apache.commons.cli.AlreadySelectedException: The option 'hostname'
was specified but an option from this group has already been selected:
'ip-address'

So it seems to be already fixed, although I do not know when the next
release will be available.

Thomas

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Mime
View raw message