Author: jdillon
Date: Mon Aug 20 12:51:14 2007
New Revision: 567803
URL: http://svn.apache.org/viewvc?rev=567803&view=rev
Log:
Slightly more groovy syntax
Modified:
geronimo/sandbox/server-gshell-launcher/modules/geronimo-commands/src/main/groovy/org/apache/geronimo/commands/StartServerCommand.groovy
Modified: geronimo/sandbox/server-gshell-launcher/modules/geronimo-commands/src/main/groovy/org/apache/geronimo/commands/StartServerCommand.groovy
URL: http://svn.apache.org/viewvc/geronimo/sandbox/server-gshell-launcher/modules/geronimo-commands/src/main/groovy/org/apache/geronimo/commands/StartServerCommand.groovy?rev=567803&r1=567802&r2=567803&view=diff
==============================================================================
--- geronimo/sandbox/server-gshell-launcher/modules/geronimo-commands/src/main/groovy/org/apache/geronimo/commands/StartServerCommand.groovy
(original)
+++ geronimo/sandbox/server-gshell-launcher/modules/geronimo-commands/src/main/groovy/org/apache/geronimo/commands/StartServerCommand.groovy
Mon Aug 20 12:51:14 2007
@@ -60,8 +60,12 @@
}
protected Options getOptions() {
- def messages = getMessageSource()
+ //
+ // NOTE: Have to use super.getOptions() here, as it seems that super.options
+ // will cause Groovy to spin out of control in recursion
+ //
def options = super.getOptions()
+ def messages = messageSource
options.addOption(OptionBuilder.withLongOpt('verbose')
.withDescription(messages.getMessage('cli.option.verbose'))
@@ -125,10 +129,8 @@
protected boolean processCommandLine(CommandLine line) throws CommandException {
assert line
- def args = line.getArgs()
-
- def io = getIO()
- def messages = getMessageSource()
+ def args = line.args
+ def messages = messageSource
if (args.length > 0) {
io.err.println(messages.getMessage("info.unexpected_args", args.join(' ')))
|