From: "Jason Horman" <[EMAIL PROTECTED]> > I am attaching the new Jelly.java and testCmdLineOptions.jelly files. New > usage will be: > > Usage: jelly [scriptFile] [-script scriptFile -o outputFile > -Dsysprop=syspropval] > > -script overrides the scriptFile specified. arg[2] = outputFile is > deprecated. > > Additional command line options are available in jelly scripts by using the > commandLine.getOptionValue(optionName) method. Args is also still available. > > context.setVariable("args", args); > context.setVariable("commandLine", cmdLine); > > This change requires commons-lang and commons-cli. I developed this against > the cvs version of CLI which seems to be incompatible with the latest CLI > binary dist from jakarta. I am attaching the jar of the latest cvs version. > BTW, the maven and ant configs of CLI don't work right with the latest > version of MAVEN.
Great stuff Jason! Many thanks. I've committed all these changes. FWIW I just tried to build the latest CLI via Maven (b7) and it worked fine. (I did make one minor patch to a unit test case that wasn't working on Windows). I've also updated the current commons-cli SNAPSHOT in the Maven repository. I've added a little target to maven.xml so that you can type... maven demo:cmdline to run your command line Jelly script that demonstrates how to access the command line options and arguments from inside a Jelly script (using beanshell) James ------- http://radio.weblogs.com/0112098/ __________________________________________________ Do You Yahoo!? Everything you'll ever need on one web page from News and Sport to Email and Music Charts http://uk.my.yahoo.com -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>