commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bob mcwhirter <...@werken.com>
Subject [CLI] multiple args
Date Fri, 14 Jun 2002 04:08:52 GMT

Howdy folks--

We allow multiple values for an argument now, so that

	-D foo bar baz

results in 'D' having 3 args.

Now, I'd like to have multiple instances of single-arg options.

To get the above, you'd have to do

	-D foo -D bar -D baz

Why?

	maven -D maven.username=werken maven:deploy-site

I want to allow multiple -D options, and have them anywhere
in the command-line.

Right now, that's interp'd as

	maven -D maven.username=werken -D maven:deploy-site

Which is wrong.

Workaround is reordering the command-line:

	maven maven:deploy-site -D maven.username=werken

Seems like an arbitrary restriction.

Any thoughts on how to hack in multiple-instances-single-arg options
without adding yet-another-boolean-parameter to all of the signatures?

Maybe time to re-arch, and have folks instantiate NoArgOption,
SingleArgOption and MultiArgOption subclasses, and add them
directly to Options?

	-bob


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


Mime
View raw message