I hope to get around to this either tonight or tomorrow. I don't think
its a big deal. The way that Maven uses this is by passing in its
own usage statement i.e. maven [options] [goal [goal2 [goal3] ... ]]
and then using the getArgs method on CommandLine to get the values of
'goals'. Does this solution satisfy you?
I haven't thought this out fully but when I do I will post back to the list.
-John K
On Saturday, Nov 16, 2002, at 14:23 Europe/Dublin, Max Rydahl Andersen wrote:
Just wondering if you found out of something regarding this ?
/max
----- Original Message -----
From: "John Keyes" <[EMAIL PROTECTED]>
To: "Jakarta Commons Developers List" <[EMAIL PROTECTED]>
Sent: Wednesday, November 13, 2002 1:06 AM
Subject: Re: [cli] Add support for stuff like [target [target2 [target3]
...]]
Max, I haven't had a chance to get around to this today. I'll investigate it tomorrow for you.-John K On Saturday, Nov 9, 2002, at 12:50 Europe/Dublin, Max Rydahl Andersen wrote:I do not know the correct term for the feature, but something like:
"anonymous options" that is always listed at the end of the
commandline.
Currently one access these options via cmdline.getArgList(), but e.g.
the
HelpFormatter does not include these in its usage print and they are
not
verified by the parser. e.g. man command line is required to have at
least
one page argument, but that is not checkked by the parser - that
should be
possible.
Maybe something like this:
For Ant targets:
Option config
=OptionBuilder.hasOptionalArgs().isAnonymous().withArgName("target"). wi
thDes
cription("Targets to execute").create("targets");
For man pages:
Option config
=OptionBuilder.hasOptionalArgs().hasAtLeast(1).isAnonymous().withArgN am
e("pa
ge").withDescription("Page to show").create("pages");
Would'nt that provide a more complete commandline definition/parsing ?
/max
p.s. I haven't overlooked something in the docs, right ?
--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
- - - - - - - - - - - - - - - - - - - - - - - Jakarta Commons CLI http://jakarta.apache.org/commons/cli -- To unsubscribe, e-mail:<mailto:[EMAIL PROTECTED]>For additional commands, e-mail:<mailto:[EMAIL PROTECTED]>
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
- - - - - - - - - - - - - - - - - - - - - - - Jakarta Commons CLI http://jakarta.apache.org/commons/cli -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
