commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Wolfgang Roessler <cont...@roessler-wolfgang.de>
Subject CLI 2
Date Sat, 04 Aug 2007 21:26:31 GMT
Hello,

I am currently implementing a codegenerator and decided to use CLI for 
command line parsing. As CLI 1.x leaves me with a lot of validation work 
to be done, I decided to give CLI2 a try. It works a lot better for me, 
but I still have some problems. Perhaps there are some ideas to solve them.

The first argument of the command-line should be the target-language to 
generate. As far as I understund, I have two possibilies for this: 
CommandOption and ArgumentOption+EnumValidator. The CommandOption has 
the problem, that I can't define that they are mutually exclusive. With 
the ArgumentOption+EnumValidator the output of the HelpFormatter misses 
the possible values.

When I am using a FileValidator for a argument, e.g. to specify the 
ouput-directory and enforce it is existing, I get an "Unexpected value" 
error if the directory does not exist. I would expect that the argument 
is recognized and a suitable error-message is printed.

Greets
Wolfgang

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


Mime
View raw message