審美的な質問ですが、なぜ cli.usage() を印刷すると最後に null が返されるのでしょうか?
def cli = new CliBuilder(usage:'helloWord')
cli.help('prints this message')
cli.project(args:1, argName:'project', 'project name')
cli.desc(args:2, argName:'desc', 'project description')
cli.f('force creation')
def options = cli.parse(args)
if (options.help){
print cli.usage()
return
}
groovy helloWorld.groovy -help で出力
usage: helloWorld
-desc <desc> project description
-f force creation
-help prints this message
-project <project> project name
null