commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael A. Smith" <>
Subject Re: [CLI] multiple args
Date Fri, 14 Jun 2002 04:30:26 GMT
On Fri, 14 Jun 2002, bob mcwhirter wrote:
> > > Any thoughts on how to hack in multiple-instances-single-arg options
> > > without adding yet-another-boolean-parameter to all of the signatures?
> > 
> > How about an "end-of-list" marker:
> > 
> > maven -D macen.username=werken -- maven:deploy-site
> While technically a good solution, it breaks compatibility with other
> tools such as javac, ant, make, and most any other compiler out there.

except that I don't think any of those allow arbitrary number of 
options unless they are last on the command line.  Most options take 
only a single argument and when they take multiple you're usually stuck 
with specifying the option multiple times, once per argument.  So, I'm 
not exactly sure how its not compatible.

> I want to be able to reproduce ant's command-line interface, which
> doesn't require the --.

I'm not sure how much Ant's command-line interface has changed since I
last did much in-depth playing with Ant, but from what I remember their
command syntax was similar to this:

  ant [options] target [target ...]

None of the options allowed more than one argument, so I'm not sure how 
an argument type that has multiple arguments would make it not 
compatible (the Ant command line tool wouldn't use the multiple argument 
option thingy).  If you want multiple -D properties, you're required to 
specify -D multiple times.  

Maybe I need to look more into CLI -- I might be missing something...  
it's been on my todo list for way too long now.  :)


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

View raw message