Skip to content

Picocli 3.8.1

Compare
Choose a tag to compare
@remkop remkop released this 02 Dec 21:27

Picocli 3.8.1

The picocli community is pleased to announce picocli 3.8.1.

This release contains bugfixes and minor enhancements.

Command methods explicitly throwing a ParametersException is now correctly handled by picocli, showing the error message and the usage help message.

This release adds support for JCommander-style argument files (one argument per line, no quoting) and better tracing.

Many thanks to the many members of the picocli community who contributed!

This is the forty-third public release.
Picocli follows semantic versioning.

Table of Contents

New and Noteworthy

Simplified Argument Files

In this argument file format every line (except comment lines) is interpreted as a single argument. Arguments containing whitespace do not need to be quoted, but it is not possible to have arguments with embedded newlines.

Set system property picocli.useSimplifiedAtFiles without a value or with value "true" (case-insensitive) to enable this simpler argument file format.

This format is similar to the way JCommander processes argument files, which makes it easier for command line applications to migrate from JCommander to picocli.

Improved Tracing

The following information has been added to the tracing output in this release:

  • Version information (picocli version, java version, os version), logged at INFO level
  • ANSI enabled status, logged at DEBUG level
  • Log at DEBUG level when a Map or Collection binding for an option or positional parameter is initialized with a new instance
  • Log at DEBUG level when parameters are being split (into how many parts, show resulting parts)

Fixed issues

  • [#551] Enhancement: Add support for JCommander-style argument files (one argument per line, no quoting). Thanks to Lukáš Petrovický for the bug report and unit tests.
  • [#562] Enhancement: Allow for enabling quote trimming via system property picocli.trimQuotes. Thanks to Lukáš Petrovický for the pull request.
  • [#560] Enhancement: Better tracing.
  • [#554] Bugfix: Convenience method error handling was broken for command methods that explicitly throw an ParameterException: InvocationTargetException hides the ParameterException. Thanks to SysLord for the bug report.
  • [#553] Doc: Fix broken link to CommandLine.java source code. Thanks to Simon Legner for the pull request.
  • [#563] Doc: Improve documentation for explicitly showing usage help from subcommands. Thanks to Steve Johnson for raising this issue.

Deprecations

No features were deprecated in this release.

Potential breaking changes

This is a patch release and has no breaking changes.