[ https://issues.apache.org/jira/browse/GROOVY-9165?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16880229#comment-16880229 ]
Remko Popma edited comment on GROOVY-9165 at 7/8/19 11:29 AM: -------------------------------------------------------------- I've had a chance to take a look at the changes. I think we should just use plain picocli instead of an creating a new internal CliBuilder. Some of the tools have been localized but picocli can do internationalization. I can help with the changes but I want to work on releasing picocli 4.0 first. After that I'd be happy to help migrate the 6 classes that currently use the new internal CliBuilder to plain picocli on both master and the 2.5 branch. was (Author: rem...@yahoo.com): I've had a chance to take a look at the changes. I think we should just use plain picocli instead of an internal CliBuilder. Some of the tools have been localized but picocli can do internationalization. I can help with the changes but I want to work on releasing picocli 4.0 first. After that I'd be happy to help migrate the 6 classes that currently use the new internal CliBuilder to plain picocli on both master and the 2.5 branch. > Grape cannot pull in picocli > ---------------------------- > > Key: GROOVY-9165 > URL: https://issues.apache.org/jira/browse/GROOVY-9165 > Project: Groovy > Issue Type: Improvement > Components: Grape, groovy-runtime > Affects Versions: 2.5.0, 2.5.1, 2.5.2, 2.5.3, 2.5.4, 2.5.5, 2.5.6, 2.5.7 > Reporter: Remko Popma > Assignee: Paul King > Priority: Major > Fix For: 3.0.0-beta-2 > > Time Spent: 20m > Remaining Estimate: 0h > > If I try to run a Groovy script I am unable to pull in a newer version of > picocli via {{@Grab}}: > {code:groovy} > @Grab('info.picocli:picocli-groovy:4.0.0-beta-1b') > @GrabExclude('org.codehaus.groovy:groovy-all') > @picocli.groovy.PicocliScript > @picocli.CommandLine.Command > import picocli.CommandLine > println "Groovy version ${GroovySystem.version}" > println "Picocli version $CommandLine.VERSION" > {code} > Depending on the Groovy version, this prints > {code} > Groovy version 2.5.0 > Picocli version 3.0.2 > {code} > or > {code} > Groovy version 2.5.7 > Picocli version 3.9.5 > {code} > So the {{@Grab('info.picocli:picocli-groovy:4.0.0-beta-1b')}} is not honoured. > This is because the {{groovy.ui.GroovyMain}} class, which executes Groovy > scripts, itself uses picocli to parse the command line parameters. > Unfortunately, this means that Groovy script authors cannot control the > picocli version used by their scripts. > Is there anything we can do to improve this? -- This message was sent by Atlassian JIRA (v7.6.3#76005)