commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rob Oxspring" <roxspr...@imapmail.org>
Subject Re: [CLI] Version 2.0 - API
Date Wed, 05 Mar 2003 13:26:48 GMT
> Okay the anonymous ones are used for things like goal in maven and
> target in ant.  The name is used for the HelpFormatter so it
> can format this into [target1 [target2...[targetN]]].
>
> An Arugment is anything that requires a value, so for example if
> you are using the -buildfile argument for ant you would do the
> following:
>
> Argument buildfile = builder.withShortName("f")
>                             .withLongName("buildfile")
>                             .create();
> opts.add(buildfile);
> ...
> CommandLine line = parser.parse(opts, args);
>
> String buildxml = line.getValue("-f");
>
> I hope this explains it.

Thanks John,

They work just as expected... I'd just forgotten that Argument extends Option and couldn't
see how Arguments interacted with
everything else.  It might be time for a coffee...

Rob


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


Mime
View raw message