commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Berin Loritsch" <>
Subject RE: [CLI] Making Option Extensible
Date Wed, 24 Jul 2002 13:25:42 GMT
> From: Nicola Ken Barozzi [] 
> John Keyes wrote:
> >>John Keyes wrote:
> >>...
> >>
> >>>I was thinking about how this would affect the current 
> implementation 
> >>>and I winced at all of the changes to the constructors and the 
> >>>addOption methods.
> >>
> >>Have you looked at the Avalon CLI?
> >>We want to move it to Commons, this can be a good opportunity to 
> >>compare
> >>approaches and point of integration.
> > 
> > I have looked at this before but I didn't see any stuff
> > in there that CLI does not already have.  What are the benefits of 
> > using Avalon CLI versus Commons CLI?
> I'm sending this also to the Avalon Developers List, so that 
> the authors 
> can reply better to this question.

I heard a rumor that Commons CLI does not support the GNU standards
on CLI options.  GNU standards have already affected a large number
of standard software options for UNIX based Oss, and it is a decently
thought out standard.  The basic gist is this:


The double-dash signifies a long option name, and any arguments for
the option follow using spaces to separate them from the option name.

The single-dash signifies a short option name (a single character),
and any arguments follow directly after the option name.

Examples of options with arguments:

--definition foo=bar

--file myfile.xml

We can also combine a number of options after one dash:

-hDf foo=bar myfile.xml

All arguments are separated by a space, and are resolved in the order
that the option is listed.

Whether you support the decision to use GNU standards or not, they
not be ignored because they aren't Apache standards.

I also would argue that the "Java" option style really has no standard.
All options (short or long) have one dash, but there is no way to
a more readable version of a short option or shortcut the typing for a
long option.  They are what they are.

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message