E.g.
options {
option "foo", "Foo set"
option "bar", "Bar has an argument of type int"
withOptionalArg() ofType Integer
}
println "Hello ${options.nonOptionArguments()}: " +
"${options.has('foo')} ${options.valueOf('bar')}"
[#50427095] [bs-135] Plugin model for spring commands
8 lines
294 B
Groovy
8 lines
294 B
Groovy
options {
|
|
option "foo", "Foo set"
|
|
option "bar", "Bar has an argument of type int" withOptionalArg() ofType Integer
|
|
}
|
|
|
|
org.springframework.bootstrap.cli.command.ScriptCommandTests.executed = true
|
|
println "Hello ${options.nonOptionArguments()}: ${options.has('foo')} ${options.valueOf('bar')}"
|