[ https://issues.apache.org/jira/browse/GROOVY-8520?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16421825#comment-16421825 ]
Remko Popma commented on GROOVY-8520: ------------------------------------- h3. Task breakdown and status update (List may change as I discover new work) h4. picocli changes * (/) Provide API to disallow POSIX clustered short options [308|https://github.com/remkop/picocli/issues/308] * (/) Provide CommandLine.usage(PrintWriter) method [307|https://github.com/remkop/picocli/issues/307] * (/) Provide API to validate max arg count after split [313|https://github.com/remkop/picocli/issues/313] - to mimic commons-cli validation * (/) Provide CommandLine.setUsageWidth(int) method [314|https://github.com/remkop/picocli/issues/314] - functionality exists but is not exposed as API * Apply type conversion on ArgSpec.defaultValue [315|https://github.com/remkop/picocli/issues/315] * (/) Lenient mode for extracting annotations [316|https://github.com/remkop/picocli/issues/316] - allows mixing picocli annotations with {{groovy.cli}} annotations * Split model IBinding into IGetter and ISetter [318|https://github.com/remkop/picocli/issues/318] - allows using Closures for binding {{groovy.cli}} annotations to the model h4. CliBuilder changes * (/) Remove CliBuilder properties that expose commons-cli underlying parser * (/) Replace use of commons-cli Option with picocli OptionSpec * (/) Build groovy.cli annotations-based parser with picocli CommandSpec/OptionSpec/UnmatchedArgsBinding API * Dynamically build parser with picocli CommandSpec/OptionSpec API * (/) Convert commons-cli-based Option property names to the equivalent picocli OptionSpec API: ** (/) argName: {{paramLabel}} (surround by fish brackets in CliBuilder) ** (/) opt, longOpt, shortName: {{names}} array in picocli OptionSpec ** (/) args, numberOfArguments, numberOfArgumentsString, optionalArg: all map to {{arity}} range in picocli ** (/) valueSeparator: {{splitRegex}} in OptionSpec ** (/) convert: {{converters}} in OptionSpec ** (/) type: same ** (/) required: same ** (/) defaultValue: same * Changes to OptionAccessor: ensure all {{commons.cli.CommandLine}} methods are mapped to picocli {{ParseResult}} methods. * TODO if help is requested, cli should not validate missing required options/parameters. How does this work in commons-cli? * Other... h4. Documentation changes * (/) Remove references to commons-cli underlying parser API * Document how legacy commons-cli property names are mapped to picocli attributes * Other... h4. Tests Analysis not started yet. > Replace commons-cli with picocli in CliBuilder > ---------------------------------------------- > > Key: GROOVY-8520 > URL: https://issues.apache.org/jira/browse/GROOVY-8520 > Project: Groovy > Issue Type: Improvement > Components: command line processing > Reporter: Remko Popma > Priority: Major > > This ticket proposes to replace commons-cli with picocli in > {{groovy.util.CliBuilder}}. > See [discussion on the mailing > list|https://lists.apache.org/thread.html/d60b6d5d4411e9ba0d7dc209cde8a9bb4abb00f0b9c0322f068c322e@%3Cdev.groovy.apache.org%3E] > for the original proposal and comparison with other CLI libraries. > Goals for the initial implementation: > * preserve the current CliBuilder behaviour as much as possible > * deliver an implementation, tests and documentation in time to be included > in the 2.5 GA release -- This message was sent by Atlassian JIRA (v7.6.3#76005)