On 01/09/07, Russel Winder <[EMAIL PROTECTED]> wrote: > On Sat, 2007-09-01 at 09:45 -0700, Mark Fortner wrote: > > I suspect the problem is that you're using -D parameters (which are used to > > set java runtime environment variables) rather than your own options. Also, > > I'm not aware of CLI supporting multiple option values in the same option. > > It would be better to simply add multiple options for the various parameters > > you are trying to capture. > > I'm afraid the problem is that Commons CLI just has problems. 1.0 has > various bugs which Henri and others people have had a good go at fixing. > Unfortunately, despite all the bug fixes, 1.1 has a couple of > showstopping bugs which make it unusable -- for the Groovy project at > least. I am going to take a look at 2.0 in the next couple of weeks, > but at the moment -- from the Groovy project perspective -- Commons CLI > is looking less and less viable. Many on the team want to ditch using > it now and move to something home grown or switch to jopt-simple or > possibly Args4J when we switch to Java 5. > > > If you must put all of those parameter name/value pairs into a single > > option, it might be better to do it like this: > > > > -P value=key,nextvalue=newkey,hello=world > > > > You can then split them using the "," delimiter, and split them again using > > the "=" delimiter to get the name/value pairs that you want. > > > > Hope this helps, > > The problem is that commands lines with: > > -D... -D... -D... -J -X... -J -X.... -D.... > > are exactly what is needed. If Commons CLI cannot handle such command > lines (and currently 1.1 cannot) then it is not an alternative.
For much the same reasons, I had to abandon converting JMeter from Avalon CLI to use Commons CLI. JMeter uses an updated version of Avalon (which has been contributed to Commons CLI, but not yet released). > Unfortunately, I don't have the time to be able to wade in and try and > create a suitable fixing patch. Commons CLI though needs effort sooner > rather than later or it will not be a live project. > > -- > Russel. > ==================================================== > Dr Russel Winder t: +44 20 7585 2200 > 41 Buckmaster Road m: +44 7770 465 077 > London SW11 1EN, UK w: http://www.russel.org.uk/ > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
