You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Rob Oxspring <ro...@imapmail.org> on 2003/08/12 02:09:44 UTC

[CLI] 2.0 Proposal

Hi all,

I've finally got to another sensible point to present my CLI2 proposal.  I've started using the maven build process so this time I'm able to supply binaries as well as sources, unfortunately though, I've not bothered to get them named sensibly yet.

Grab zips from http://www.oxspring.demon.co.uk/cli/3/ and have a quick look at http://www.oxspring.demon.co.uk/cli/3/docs/usage.html for a first cut of basic usage documentation.  

So, features:

-    Complete rewrite to use clean model from the beginning.
-    Sits in org.apache.commons.cli2 so that there is no conflict with the cli1 class files - they can probably be deprecated rather than deleted.
-    Each Option implementation is responsible for its own functionality - parsing, validation, help/usage strings all handled by the Options themselves.
-    Copes with standard options, cvs style commands and +/- switches with arguments and in flexible groups.
-    Copes with java style property arguments and "--" options in a clean mannar
-    Anonymous arguments "fall out" of the design (just add to a Group)
-    Easily extended to new option types with minimal changes necessary
-    HelpFormatter has returned
-    CommandLineParser adds parseAndHelp(..) method to easily add basic error reporting and usage help to client applications (Only thought of this at the weekend but it seems to work and only throws the IOException of writing out the help http://www.oxspring.demon.co.uk/cli/3/docs/usage.html#Querying%20CommandLine)
-    Order of Options is dependant on Comparators so can be customised at runtime.


And still todo:
-    More docs
-    Pluggable argument validation
-    XML configuration?
-    Reflection configuration?
-    Ant task generation?
-    Always more tests


Any thoughts and comments are welcome,

Rob