commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bob mcwhirter <>
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


	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?


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

View raw message