Picocli Versions Save

Picocli is a modern framework for building powerful, user-friendly, GraalVM-enabled command line apps with ease. It supports colors, autocompletion, subcommands, and more. In 1 source file so apps can include as source & avoid adding a dependency. Written in Java, usable from Groovy, Kotlin, Scala, etc.

v4.7.5

8 months ago

Picocli 4.7.5

The picocli community is pleased to announce picocli 4.7.5.

This release includes bugfixes and enhancements.

Many thanks to the picocli community for raising these issues and providing the pull requests to address them!

This is the eighty-forth public release. Picocli follows semantic versioning. Artifacts in this release are signed by Remko Popma (6601 E5C0 8DCC BB96).

Table of Contents

New and Noteworthy

Fixed issues

  • [#2083][#2084] Enhancement: Java 22 update: improve logic for detecting if the output stream is connected to a terminal. Thanks to Liam Miller-Cushon for the pull request.
  • [#2087] Enhancement: Mask parameters in trace log when echo=false for interactive options and positional parameters. Thanks to szzsolt for raising this.
  • [#2060] Bugfix: Fix positional parameters bug with late-resolved arity variable. Thanks to daisukeoto for raising this.
  • [#2074][#2075] Bugfix: Don't generate auto-complete for hidden attributes in picocli.shell.jline3.PicoCommand. Thanks to clebertsuconic for the pull request.
  • [#2059] Bugfix: ArgGroup with exclusive=false and multiplicity=1 should require at least one option; fix regression and refine solution introduced in [#1848][#2030]. Thanks to Utkarsh Mittal for raising this.
  • [#2080] DOC: Improve GraalVM documentation: add graalvm-native-image-plugin. Thanks to Bhavik Patel for the pull request.
  • [#2045] DOC: Commit html files with LF line-endings. Thanks to Fridrich Strba for the pull request.

Deprecations

No features were deprecated in this release.

Potential breaking changes

This release has no breaking changes.

v4.7.4

11 months ago

Picocli 4.7.4

The picocli community is pleased to announce picocli 4.7.4.

This release includes bugfixes and enhancements.

Many thanks to the picocli community for raising these issues and providing the pull requests to address them!

This is the eighty-third public release. Picocli follows semantic versioning. Artifacts in this release are signed by Remko Popma (6601 E5C0 8DCC BB96).

Table of Contents

New and Noteworthy

See fixed items below.

I cheated on the semantic versioning in this release: a public setter method was added in a class in the picocli.shell.jline3 module. In spite of that, the version number went from 4.7.3 to 4.7.4 (not 4.8.0). My apologies.

Fixed issues

  • [#2028][#2031] API: Add setter for name in picocli.shell.jline3.PicocliCommands. Thanks to Irina Leontyuk for raising this.
  • [#2026][#2027] Enhancement: Improved feedback on mistyped subcommands. Thanks to David Pond for the pull request.
  • [#2029][#2034] Enhancement: prevent java.nio.charset.UnsupportedCharsetException: cp0 on windows, and fall back to the default charset if the charset provided by System property sun.stdout.encoding is invalid. Thanks to Bartosz Spyrko-Smietanko for the pull request.
  • [#2035][#2036] Bugfix: Option "mapFallbackValue" ignored when inherited to subcommand. Thanks to Dan Ziemba for the pull request.
  • [#1848][#2030] Bugfix: fix issue with required options in ArgGroup becoming optional when combined with DefaultValueProvider. Thanks to Ruud Senden and Mike Snowden for the pull request.
  • [#2020] DEP: Bump step-security/harden-runner from 2.3.0 to 2.4.0
  • [#2033] DEP: Bump github/codeql-action from 2.2.12 to 2.3.5
  • [#2015] DEP: Bump junit5Version from 5.9.2 to 5.9.3
  • [#2014] DEP: Bump org.jetbrains.kotlin:kotlin-gradle-plugin from 1.8.20 to 1.8.21
  • [#2013] DEP: Bump org.jetbrains.kotlin:kotlin-script-runtime from 1.8.20 to 1.8.21
  • [#2008] DEP: Bump springBootVersion from 2.7.10 to 2.7.11
  • [#2007] DEP: Bump org.asciidoctor:asciidoctorj-pdf from 2.3.6 to 2.3.7

Deprecations

No features were deprecated in this release.

Potential breaking changes

This release has no breaking changes.

v4.7.3

1 year ago

Picocli 4.7.3

The picocli community is pleased to announce picocli 4.7.3.

This release includes bugfixes and enhancements.

This is the eighty-second public release. Picocli follows semantic versioning. Artifacts in this release are signed by Remko Popma (6601 E5C0 8DCC BB96).

Table of Contents

New and Noteworthy

Fixed a regression introduced in picocli 4.7.2. Multi-value options whose fallbackValue is set to CommandLine.Option.NULL_VALUE, may see a NullPointerException if the option is specified on the command line without a parameter but with a = attached, like --option=.

Also, this release fixes broken links in the Javadoc.

Known issues

NOTE: A minor issue with this release is that the version string in the info.picocli.CommandLine.VERSION field is incorrectly set to 4.7.3-SNAPSHOT (should have been 4.7.3).

Fixed issues

  • [#1998] Bugfix: ParameterException: NullPointerException: null while processing argument at or before arg[0]. Thanks to Jiri Daněk for raising this.
  • [#1957] DOC: Fixed broken links in the javadoc. Thanks to Andreas Deininger for raising this.
  • [#2002] DEP: Bump actions/checkout from 3.5.0 to 3.5.2
  • [#2005] DEP: Bump gradle/gradle-build-action from 2.4.0 to 2.4.2
  • [#2003] DEP: Bump github/codeql-action from 2.2.11 to 2.2.12
  • [#1997] DEP: Bump org.asciidoctor:asciidoctorj-pdf from 2.3.4 to 2.3.6

Deprecations

No features were deprecated in this release.

Potential breaking changes

This release has no breaking changes.

v4.7.2

1 year ago

Picocli 4.7.2

The picocli community is pleased to announce picocli 4.7.2.

This release includes bugfixes and enhancements.

This is the eighty-first public release. Picocli follows semantic versioning. Artifacts in this release are signed by Remko Popma (6601 E5C0 8DCC BB96).

Table of Contents

New and Noteworthy

  • Bugfix: fallbackValue=Option.NULL_VALUE did not work for Collection or array options.
  • Fixed isJansiConsoleInstalled performance issue.
  • Kotlin enhancement: improved paramLabel string auto-generated from Kotlin internal methods which have mangled names with embedded "$".
  • Various documentation fixes.

Fixed issues

  • [#1959] API: Add ability to enable loading resource bundles in annotation processor for tests.
  • [#1993] Bugfix: fallbackValue=Option.NULL_VALUE did not work for Collection or array options. Thanks to Jiri Daněk for raising this.
  • [#1975][#1976] Enhancement: Fixed isJansiConsoleInstalled performance issue. Thanks to ChrisTrenkamp for the pull request.
  • [#1932] Enhancement: Move System-Rules tests to Java 5 test module; move System-Lambda tests to Java 8+ test module. Facilitate testing with recent JRE's.
  • [#1984] Enhancement (Kotlin): improve paramLabel string auto-generated from Kotlin internal methods which have mangled names with embedded "$". Thanks to Ken Yee for raising this.
  • [#1945] DOC: Code sample: add Java version. Thanks to Andreas Deininger for the pull request.
  • [#1956] Doc: Fix broken link in user manual. Thanks to Andreas Deininger for the pull request.
  • [#1955] DEP: Bump asciidoctorj from 2.5.5 to 2.5.7. Thanks to Andreas Deininger for the pull request.
  • [#1980] DEP: Bump actions/checkout from 3.3.0 to 3.5.0
  • [#1952] DEP: Bump actions/setup-java from 3.9.0 to 3.10.0
  • [#1985] DEP: Bump actions/setup-java from 3.10.0 to 3.11.0
  • [#1941] DEP: Bump emibcn/badge-action from 1.2.4 to 2.0.2
  • [#1942] DEP: Bump github/codeql-action from 2.1.39 to 2.2.1
  • [#1953] DEP: Bump github/codeql-action from 2.2.1 to 2.2.3
  • [#1958] DEP: Bump github/codeql-action from 2.2.3 to 2.2.4
  • [#1979] DEP: Bump github/codeql-action from 2.2.4 to 2.2.8
  • [#1995] DEP: Bump github/codeql-action from 2.2.8 to 2.2.11
  • [#1961] DEP: Bump gradle/gradle-build-action from 2.3.3 to 2.4.0
  • [#1960] DEP: Bump gradle/wrapper-validation-action from 1.0.5 to 1.0.6
  • [#1962] DEP: Bump log4j2Version from 2.19.0 to 2.20.0
  • [#1947] DEP: Bump org.jetbrains.kotlin:kotlin-gradle-plugin from 1.7.20 to 1.8.10
  • [#1989] DEP: Bump org.jetbrains.kotlin:kotlin-gradle-plugin from 1.8.10 to 1.8.20
  • [#1948] DEP: Bump org.jetbrains.kotlin:kotlin-script-runtime from 1.7.20 to 1.8.10
  • [#1988] DEP: Bump org.jetbrains.kotlin:kotlin-script-runtime from 1.8.10 to 1.8.20
  • [#1968] DEP: Bump org.jline:jline from 3.22.0 to 3.23.0
  • [#1990] DEP: Bump ossf/scorecard-action from 2.1.2 to 2.1.3
  • [#1964] DEP: Bump springBootVersion from 2.7.8 to 2.7.9
  • [#1978] DEP: Bump springBootVersion from 2.7.9 to 2.7.10
  • [#1963] DEP: Bump step-security/harden-runner from 2.1.0 to 2.2.0
  • [#1970] DEP: Bump step-security/harden-runner from 2.2.0 to 2.2.1
  • [#1992] DEP: Bump step-security/harden-runner from 2.2.1 to 2.3.0

Deprecations

No features were deprecated in this release.

Potential breaking changes

This release has no breaking changes.

v4.7.1

1 year ago

Picocli 4.7.1

The picocli community is pleased to announce picocli 4.7.1.

This release includes bugfixes and enhancements.

This is the eightieth public release. Picocli follows semantic versioning. Artifacts in this release are signed by Remko Popma (6601 E5C0 8DCC BB96).

Table of Contents

New and Noteworthy

Fixed issues

  • [#1874][#1885][#1933] Bugfix: The picocli-groovy module should not declare org.codehaus.groovy:groovy-all as dependency. Thanks to Mattias Andersson and Michael Kutz for raising this, and to Paul King for the analysis.
  • [#1886][#1896] Bugfix: AsciiDoc generator now correctly outputs options even if all options are in ArgGroups. Thanks to Ruud Senden for the discussion and the pull request.
  • [#1878][#1876] Bugfix: Annotation processor now avoids loading resource bundles at compile time. Thanks to Ruud Senden for the discussion and the pull request.
  • [#1911] Avoid using boxed boolean in CommandLine.Interpreter.applyValueToSingleValuedField. Thanks to Jiehong for the pull request.
  • [#1870] Bugfix: StringIndexOutOfBoundsException in usage help when command has many (and long) aliases. Thanks to Martin for raising this.
  • [#1904] Bugfix: Apply fallbackValue to vararg multi-value options, not just single-value options. Thanks to Andreas Sewe for raising this.
  • [#1930] Bugfix: Ensure tests pass in environments for Java 5-18.
  • [#1940] Bugfix: fix 3 failing tests in ManPageGeneratorTest. Thanks to Mike Snowden for the pull request.
  • [#1881] DOC: Many documentation improvements. Thanks to Andreas Deininger for the pull request.
  • [#1855][#1857] DOC: Add new user manual section called Rare Use Cases detailing System.exit usage. Thanks to Tadaya Tsuyukubo for the pull request.
  • [#1880] DOC: Improve documentation for negatable options that are true by default. Thanks to Sebastian Hoß for raising this.
  • [#1815] DOC: Improve user manual section for non-validating ArgGroups. Thanks for Paul Harris for raising this.
  • [#1908] DOC: Update the user manual GraalVM section to use the new official native-maven-plugin. Thanks to tison for the pull request.
  • [#1924] DOC: Update picocli-codegen/README.adoc. Thanks to Seyyed Emad Razavi for the pull request.
  • [#1910][#1917] DOC: Fix broken link to Zero Bug Commitment. Thanks to Jiehong for raising this and thanks to Andreas Deininger for the pull request.
  • [#1915] DOC: Improve default provider examples. Thanks to David for raising this.
  • [#1918][#1920] DOC: Removed unused Travis CI badge and associated broken link from README. Thanks to Andreas Deininger for raising this and the pull request.
  • [#706] DOC: Add GitHub badge with test count to README.
  • [#1939] BUILD: Fix picocli-annotation-processing-tests failures on Java 16+: rewrite tests to avoid Google compiler-test API that internally uses com.sun.tools.javac.util.Context.
  • [#1887] DEP: Bump biz.aQute.bnd.gradle from 6.3.1 to 6.4.0
  • [#1865] DEP: Bump ivy from 2.5.0 to 2.5.1
  • [#1931] DEP: Bump springBootVersion from 2.7.5 to 3.0.2
  • [#1929] DEP: Bump github/codeql-action from 2.1.29 to 2.1.39
  • [#1926] DEP: Bump step-security/harden-runner from 1.5.0 to 2.1.0
  • [#1914] DEP: Bump actions/checkout from 3.1.0 to 3.3.0
  • [#1897] DEP: Bump actions/setup-java from 3.6.0 to 3.9.0
  • [#1902] DEP: Bump ossf/scorecard-action from 2.0.6 to 2.1.2
  • [#1938] DEP: Bump actions/upload-artifact from 3.1.1 to 3.1.2
  • [#1937] DEP: Bump asciidoctorj-pdf from 2.3.3 to 2.3.4
  • [#1936] DEP: Bump jline from 3.21.0 to 3.22.0
  • [#1935] DEP: Bump compile-testing from 0.19 to 0.21.0

Deprecations

No features were deprecated in this release.

Potential breaking changes

This release has no breaking changes.

v4.7.0

1 year ago

Picocli 4.7.0

The picocli community is pleased to announce picocli 4.7.0.

This release includes bugfixes and enhancements.

A potentially breaking change is that the parser now treats char[] as a single-value type.

From this release, applications can programmatically set the trace level, and use tracing in custom components.

Applications can improve startup time by setting system property picocli.disable.closures to true to disable support for closures in annotations.

Many more fixes and enhancements, see the sections below for more details.

This is the seventy-ninth public release. Picocli follows semantic versioning. Artifacts in this release are signed by Remko Popma (6601 E5C0 8DCC BB96).

Table of Contents

New and Noteworthy

Tracing API

From picocli 4.7.0, applications can programmatically set the trace level, and use tracing in custom components.

In addition to setting system property picocli.trace, applications can now change the trace level via the Tracer::setLevel method. For example:

CommandLine.tracer().setLevel(CommandLine.TraceLevel.INFO);

The new public method CommandLine.tracer() returns the singleton Tracer object that is used internally by picocli, and can also be used by custom component implementations to do tracing. For example:

class MyIntConverter implements ITypeConverter<Integer> {
    public Integer convert(String value) {
        try {
            return Integer.parseInt(value);
        } catch (NumberFormatException ex) {
            CommandLine.tracer().info(
                    "Could not convert %s to Integer, returning default value -1", value);
            return -1;
        }
    }
}

Enable Consuming Option Names or Subcommands

By default, options that take a parameter do not consume values that match a subcommand name or an option name.

This release introduces two parser configuration options to change this behaviour:

  • CommandLine::setAllowOptionsAsOptionParameters allows options to consume option names
  • CommandLine::setAllowSubcommandsAsOptionParameters allows options to consume subcommand names

When set to true, all options in the command (options that take a parameter) can consume values that match option names or subcommand names.

This means that any option will consume the maximum number of arguments possible for its arity.

USE WITH CAUTION!

If an option is defined as arity = "*", this option will consume all remaining command line arguments following this option (until the End-of-options delimiter) as parameters of this option.

Unsorted Synopsis

By default, the synopsis displays options in alphabetical order. Picocli 4.7.0 introduces a sortSynopsis = false attribute to let the synopsis display options in the order they are declared in your class, or sorted by their order attribute.

@Command(sortSynopsis = false)

Parser change for char[] options

Prior to 4.7, the picocli parser treated options and positional parameters with type char[] as array (multi-value) options, except for interactive options. However, it is more intuitive to treat all char[] options as single-value options, similar to String options.

For end users, this means that existing applications that use non-interactive char[] options will no longer allow multiple characters to be specified separately on the command line. That is, input like -c A -c B -c C will be rejected and the user needs to specify -c ABC instead.

Applications that want to preserve the previous behaviour will need to change their code to use java.lang.Character[] instead of char[].

Fixed issues

  • [#1599] API: The picocli-codegen artifact is now an explicitly declared named JPMS module with a module-info.class.
  • [#1611] API: The picocli-groovy artifact is now an explicitly declared named JPMS module with a module-info.class.
  • [#1610] API: The picocli-shell-jline2 is now an explicitly declared named JPMS module with a module-info.class.
  • [#1609] API: The picocli-shell-jline3 is now an explicitly declared named JPMS module with a module-info.class.
  • [#1608] API: The picocli-spring-boot-starter is now an explicitly declared named JPMS module with a module-info.class. NOTE: its module name changed to info.picocli.spring.boot from info.picocli.spring.
  • [#1614] API: Change picocli-spring-boot-starter JPMS module name to info.picocli.spring.boot from info.picocli.spring.
  • [#1600] API: Add requires static java.sql to picocli module-info.
  • [#1471] API: Provide a programmatic way to configure Picocli's TraceLevel. Thanks to ekinano for raising this.
  • [#1125] API: Add parser configuration to allow options to consume values that match subcommand names or option names.
  • [#1396][#1401] API: Support generic types in containers (e.g. List, Map). Thanks to Michał Górniewski for the pull request.
  • [#1380][#1505] API, bugfix: requiredOptionMarker should not be displayed on ArgGroup options. Thanks to Ahmed El Khalifa for the pull request.
  • [#1563] API: Add constructor to PicocliSpringFactory to allow custom fallback IFactory. Thanks to Andrew Holland for raising this.
  • [#1767][#1802] API: avoid NPE on OptionSpec.getValue() and add IScoped internal API. Thanks to Ruud Senden for the discussion and the pull request.
  • [#1574] API: Add annotation API to control whether synopsis should be sorted alphabetically or by explicit order.
  • [#1708][#1712][#1723] API: The setUsageHelpLongOptionsMaxWidth method no longer throws an exception when an invalid value is specified; instead, the value is ignored and an INFO-level trace message is logged. Thanks to Fabio for the pull request.
  • [#648][#1846] Enhancement: Treat char[] as single-value types (Potentially breaking change). Thanks to Lukáš Petrovický for the pull request with the test to verify the solution.
  • [#1571] Enhancement: Variables in values from the default value provider should be interpolated. Thanks to Bas Passon for raising this.
  • [#1773] Enhancement: Applications can improve startup time by setting system property picocli.disable.closures to true to disable support for closures in annotations. Thanks to patric-r for raising this.
  • [#1408] Enhancement: Synopsis should respect order if specified. Thanks to Simon for raising this.
  • [#964][#1080] Enhancement: ArgGroup synopsis should respect order (if specified). Thanks to Enderaoe for the pull request with unit tests.
  • [#1706][#1710] Enhancement: Subcommands should get missing messages from parent command resource bundle. Thanks to Ruud Senden and Mike Snowden for the pull request.
  • [#899][#1578][#1579] Enhancement: improve built-in Help command description. Thanks to Michael L Heuer for the pull request. Thanks to Garret Wilson for raising this.
  • [#1713][#1714] Enhancement: Support optional booleans in annotation processor. Thanks to Jan Waś for the pull request.
  • [#1387][#1711] Enhancement: Annotation processor should validate final primitive and String fields with Option and Parameters annotations. Thanks to xehpuk for raising this, and thanks to Adam McElwee for the pull request.
  • [#1572] Enhancement: Remove redundant braces in ArgGroup synopsis.
  • [#1602] Enhancement: Fix incorrect debug output for add/removeAlias.
  • [#1603] Enhancement: Improve debug tracing information for help requests and command execution.
  • [#1629] Enhancement: Omit empty braces in standard prompt for interactive options without description. Thanks to Andreas Deininger for raising this.
  • [#1778] Enhancement: Add support for new Spring Boot auto configuration introduced in Spring Boot 2.7. Thanks to Andreas Asplund for the pull request.
  • [#1836][#1841] Enhancement: Command aliases on Mixin were not being applied. Thanks to Mike Snowden for the pull request and to Ruud Senden for raising this.
  • [#1754][#1759] Enhancement: Autocompletion now correctly handles completion candidates with spaces. Thanks to Juan Martín Sotuyo Dodero for the pull request.
  • [#1834][#1838] Bugfix: Incorrect synopsis for char[] options. Thanks to Ruud Senden and Mike Snowden for the pull request.
  • [#1680] Bugfix: ArgGroups with multiplicity="0" are now disallowed at construction time and no longer throw a StackOverflowError while parsing. Thanks to ARNOLD Somogyi for raising this.
  • [#1615][#1616] Bugfix: getCJKAdjustedLength() no longer miscalculates for supplementary code points. Thanks to gwalbran for the pull request.
  • [#1575] Bugfix: Synopsis should not cluster boolean options if posixClusteredShortOptionsAllowed is set to false.
  • [#1642] Bugfix: Negatable options should negate explicit values. Thanks to Nat Burns for raising this.
  • [#1696][#1697] Bugfix: ManPageGenerator asciidoc output now correctly shows options in nested ArgGroups. Thanks to Ruud Senden for the pull request.
  • [#1741] Bugfix: @Command-annotated method parameters are assigned incorrect indices when contained in a @Command class that is added as a subcommand to another @Command class which has scope = CommandLine.ScopeType.INHERIT. Thanks to Onedy for raising this.
  • [#1779] Bugfix: Custom factory should be used when creating CommandSpec. Thanks to Philippe Charles for raising this.
  • [#1644][#1863] Bugfix: autocompletion of directory names stopped working from picocli 4.6.3. Thanks to NewbieOrange for the pull request, and thanks to philgdn for raising this and verifying the solution.
  • [#1807] BUILD: Optimize incremental builds and local build cache usage. Thanks to Jean André Gauthier for the pull request and Nelson Osacky for the review.
  • [#1298] DOC: Publish all-in-one javadoc for all picocli modules.
  • [#812] DOC: Document how to test a picocli spring-boot application.
  • [#1596] DOC: fix javadoc typos and incorrect links.
  • [#1597] DOC: Add examples to Execution Configuration section in user manual.
  • [#1140] DOC: Add subsection Forcing Interactive Input to user manual Interactive Options section. Thanks to smalirizvi for raising this.
  • [#967] DOC: User manual now shows how to configure null as defaultValue and fallbackValue.
  • [#1625] DOC: Fix broken links after renaming default branch to main from master. Thanks to Andreas Deininger for the pull request.
  • [#1628][#1630] DOC: Fix broken link in picocli-codegen README. Thanks to Andreas Deininger for the pull request.
  • [#1627] DOC: User guide, chapter 3.2.3. Forcing Interactive Input: code sample: add Kotlin version. Thanks to Andreas Deininger for the pull request.
  • [#1650] DOC: User guide, Spring Boot section: add warning about dynamic proxies. Thanks to Ernst Plüss for raising this.
  • [#1677] DOC: Many improvements and corrections to the user manual. Thanks to Björn Kautler for the pull request.
  • [#1678] DOC: Change links from http to https, fix broken links. Thanks to Andreas Deininger for the pull request.
  • [#1750] DOC: Clarify that GPL licensing NOTICE is for docs only.
  • [#1788] DOC: add link to picocli-examples in the user manual. Thanks to Markus Elfring for raising this.
  • [#1796] DOC: Fixing broken links and typos. Thanks to Andreas Deininger for the pull request.
  • [#1798] DOC: update examples for jakarta.validation-api. Thanks to Roy for raising this.
  • [#1803] DOC: show @Command-annotated method with int return value in user manual. Thanks to SinaMobasheri for raising this.
  • [#1581] BUILD: Fix dependabot config.
  • [#1613] DEP: The picocli-groovy module now declares groovy-all as dependency.
  • [#1604] DEP: Remove dependency on slf4j from picocli-spring-boot-starter.
  • [#1783] DEP: Update actions/checkout requirement to 2541b1294d2704b0964813337f33b291d3f8596b
  • [#1837] DEP: Bump actions/checkout from 3.0.2 to 3.1.0
  • [#1607] DEP: Bump actions/setup-java from 2.5.0 to 3
  • [#1646] DEP: Bump actions/setup-java from 3.0.0 to 3.1.0
  • [#1655] DEP: Bump actions/setup-java from 3.1.0 to 3.1.1
  • [#1667] DEP: Bump actions/setup-java from 3.1.1 to 3.2.0
  • [#1674] DEP: Bump actions/setup-java from 3.2.0 to 3.3.0
  • [#1717] DEP: Bump actions/setup-java from 3.3.0 to 3.4.0
  • [#1736] DEP: Bump actions/setup-java from 3.4.0 to 3.4.1
  • [#1806] DEP: Bump actions/setup-java from 3.4.1 to 3.5.0
  • [#1826] DEP: Bump actions/setup-java from 3.5.0 to 3.5.1
  • [#1624] DEP: Bump actions/upload-artifact from 2.3.1 to 3
  • [#1687] DEP: Bump actions/upload-artifact from 3.0.0 to 3.1.0
  • [#1859] DEP: Bump actions/upload-artifact from 3.1.0 to 3.1.1
  • [#1585] DEP: Bump github/codeql-action from 1.0.30 to 1.1.0
  • [#1593] DEP: Bump github/codeql-action from 1.1.0 to 1.1.2
  • [#1601] DEP: Bump github/codeql-action from 1.1.2 to 1.1.3
  • [#1631] DEP: Bump github/codeql-action from 1.1.3 to 1.1.4
  • [#1636] DEP: Bump github/codeql-action from 1.1.4 to 1.1.5
  • [#1643] DEP: Bump github/codeql-action from 1.1.5 to 2.1.6
  • [#1652] DEP: Bump github/codeql-action from 2.1.6 to 2.1.7
  • [#1654] DEP: Bump github/codeql-action from 2.1.7 to 2.1.8
  • [#1669] DEP: Bump github/codeql-action from 2.1.8 to 2.1.9
  • [#1676] DEP: Bump github/codeql-action from 2.1.9 to 2.1.10
  • [#1682] DEP: Bump github/codeql-action from 2.1.10 to 2.1.11
  • [#1700] DEP: Bump github/codeql-action from 2.1.11 to 2.1.12
  • [#1720] DEP: Bump github/codeql-action from 2.1.12 to 2.1.14
  • [#1728] DEP: Bump github/codeql-action from 2.1.14 to 2.1.15
  • [#1739] DEP: Bump github/codeql-action from 2.1.15 to 2.1.16
  • [#1781] DEP: Bump github/codeql-action from 2.1.18 to 2.1.1
  • [#1786] DEP: Bump github/codeql-action from 2.1.18 to 2.1.20
  • [#1792] DEP: Bump github/codeql-action from 2.1.20 to 2.1.21
  • [#1797] DEP: Bump github/codeql-action from 2.1.21 to 2.1.22
  • [#1817] DEP: Bump github/codeql-action from 2.1.22 to 2.1.23
  • [#1820] DEP: Bump github/codeql-action from 2.1.22 to 2.1.24
  • [#1823] DEP: Bump github/codeql-action from 2.1.24 to 2.1.25
  • [#1831] DEP: Bump github/codeql-action from 2.1.25 to 2.1.26
  • [#1842] DEP: Bump github/codeql-action from 2.1.26 to 2.1.27
  • [#1862] DEP: Bump github/codeql-action from 2.1.28 to 2.1.29
  • [#1782] DEP: Bump gradle/gradle-build-action from c6619898ec857b418d6436d3efe8a0becf74eb9e to 2.2.4
  • [#1787] DEP: Bump gradle/gradle-build-action from c6619898ec857b418d6436d3efe8a0becf74eb9e to 2.2.5
  • [#1825] DEP: Bump gradle/gradle-build-action from 2.3.0 to 2.3.1
  • [#1832] DEP: Bump gradle/gradle-build-action from 2.3.1 to 2.3.2
  • [#1860] DEP: Bump gradle/gradle-build-action from 2.3.2 to 2.3.3
  • [#1861] DEP: Bump gradle/wrapper-validation-action from 1.0.4 to 1.0.5
  • [#1586] DEP: Bump ossf/scorecard-action from 1.0.2 to 1.0.3
  • [#1594] DEP: Bump ossf/scorecard-action from 1.0.3 to 1.0.4
  • [#1691] DEP: Bump ossf/scorecard-action from 1.0.4 to 1.1.0
  • [#1699] DEP: Bump ossf/scorecard-action from 1.1.0 to 1.1.1
  • [#1805] DEP: Bump ossf/scorecard-action from 1.1.2 to 2.0.0
  • [#1813] DEP: Bump ossf/scorecard-action from 2.0.0 to 2.0.2
  • [#1816] DEP: Bump ossf/scorecard-action from 2.0.0 to 2.0.3
  • [#1828] DEP: Bump ossf/scorecard-action from 2.0.3 to 2.0.4
  • [#1583] DEP: Bump step-security/harden-runner from 1.3.0 to 1.4.0
  • [#1639] DEP: Bump step-security/harden-runner from 1.4.0 to 1.4.1
  • [#1666] DEP: Bump step-security/harden-runner from 1.4.1 to 1.4.2
  • [#1730] DEP: Bump step-security/harden-runner from 1.4.3 to 1.4.4
  • [#1833] DEP: Bump step-security/harden-runner from 1.4.5 to 1.5.0
  • [#1580] DEP: Bump asciidoctor to 2.5.3 from 2.5.2. Thanks to Andreas Deininger for the pull request.
  • [#1688] DEP: Bump asciidoctorj-pdf from 1.6.2 to 2.0.0
  • [#1690] DEP: Bump asciidoctorj-pdf from 2.0.0 to 2.0.2
  • [#1692] DEP: Bump asciidoctorj-pdf from 2.0.2 to 2.0.3
  • [#1694] DEP: Bump asciidoctorj-pdf from 2.0.3 to 2.0.4
  • [#1695] DEP: Bump asciidoctorj-pdf from 2.0.4 to 2.0.6
  • [#1715] DEP: Bump asciidoctorj-pdf from 2.0.6 to 2.0.8
  • [#1722] DEP: Bump asciidoctorj-pdf from 2.0.8 to 2.1.2
  • [#1785] DEP: Bump asciidoctorj-pdf from 2.1.6 to 2.3.0
  • [#1854] DEP: Bump asciidoctorj-pdf from 2.3.0 to 2.3.3
  • [#1618] DEP: Bump biz.aQute.bnd.gradle from 6.1.0 to 6.2.0
  • [#1698] DEP: Bump biz.aQute.bnd.gradle from 6.2.0 to 6.3.0
  • [#1703] DEP: Bump biz.aQute.bnd.gradle from 6.3.0 to 6.3.1
  • [#1582] DEP: Bump groovy-all from 2.4.10 to 2.5.15 // latest version of Groovy that supports Java 5
  • [#1589] DEP: Bump hamcrest-core from 1.3 to 2.2
  • [#1621] DEP: Bump hibernate-validator from 7.0.2.Final to 7.0.3.Final
  • [#1633][#1635] DEP: Bump hibernate-validator from 7.0.3.Final to 7.0.4.Final
  • [#1821] DEP: Bump hibernate-validator from 7.0.5.Final to 8.0.0.Final
  • [#1812] DEP: Bump hibernate-validator from 7.0.5.Final to 8.0.0.Final
  • [#1622] DEP: Bump hibernate-validator-annotation-processor from 7.0.2.Final to 7.0.3.Final
  • [#1634] DEP: Bump hibernate-validator-annotation-processor from 7.0.3.Final to 7.0.4.Final
  • [#1587] DEP: Bump ivy from 2.4.0 to 2.5.0
  • [#1584] DEP: Bump jansi from 2.1.0 to 2.4.0
  • [#1573] DEP: Bump JLine3 version to 3.21.0 from 3.19.0.
  • [#1590] DEP: Bump junit-dep from 4.11 to 4.11.20120805.1225
  • [#1591] DEP: Bump junit from 4.12 to 4.13.2
  • [#1649] DEP: Bump kotlin-gradle-plugin from 1.6.10 to 1.6.20
  • [#1829] DEP: Bump kotlin-gradle-plugin from 1.7.10 to 1.7.20
  • [#1648] DEP: Bump kotlin-script-runtime from 1.6.10 to 1.6.20
  • [#1830] DEP: Bump kotlin-script-runtime from 1.7.10 to 1.7.20
  • [#1617] DEP: Bump log4j2Version from 2.17.1 to 2.17.2
  • [#1729] DEP: Bump log4j2Version from 2.17.2 to 2.18.0
  • [#1819] DEP: Bump log4j2Version from 2.18.0 to 2.19.0
  • [#1822] DEP: Bump scala-library from 2.13.8 to 2.13.9
  • [#1843] DEP: Bump scala-library from 2.13.9 to 2.13.10
  • [#1576] DEP: Bump Spring Boot version from 2.5.6 to 2.6.3
  • [#1606] DEP: Bump Spring Boot version from 2.6.3 to 2.6.4
  • [#1641] DEP: Bump Spring Boot version from 2.6.4 to 2.6.5
  • [#1645] DEP: Bump Spring Boot version from 2.6.5 to 2.6.6
  • [#1684] DEP: Bump Spring Boot version from 2.6.7 to 2.6.8
  • [#1686] DEP: Bump Spring Boot version from 2.6.8 to 2.7.0
  • [#1719] DEP: Bump Spring Boot version from 2.7.0 to 2.7.1
  • [#1747] DEP: Bump Spring Boot version from 2.7.1 to 2.7.2
  • [#1780] DEP: Bump spring Boot Version from 2.7.2 to 2.7.3
  • [#1824] DEP: Bump springBootVersion from 2.7.3 to 2.7.4
  • [#1853] DEP: Bump springBootVersion from 2.7.4 to 2.7.5
  • [#1588] DEP: Bump system-rules from 1.17.1 to 1.19.0

Deprecations

No features were deprecated in this release.

Potential breaking changes

  • The JPMS module name of picocli-spring-boot-starter has been changed to info.picocli.spring.boot from info.picocli.spring.
  • The picocli-groovy module now declares groovy-all as dependency.
  • The parser now treats char[] as a single-value type.
  • Redundant braces are now omitted in ArgGroup synopsis in usage help messages.

v4.6.3

2 years ago

Picocli 4.6.3

The picocli community is pleased to announce picocli 4.6.3.

This release includes bugfixes and enhancements, as well as documentation and security improvements.

Several improvements to the annotation processor and the generated autocompletion scripts.

Much gratitude to the picocli community for the many pull requests and other contributions!

This is the seventy-eighth public release. Picocli follows semantic versioning. Artifacts in this release are signed by Remko Popma (6601 E5C0 8DCC BB96).

Table of Contents

New and Noteworthy

Default branch renamed to main

The default branch has been renamed! master is now named main.

If you have a local clone, you can update it by running the following commands:

git branch -m master main
git fetch origin
git branch -u origin/main main
git remote set-head origin -a

Autocompletion script improvements

  • Autocompletion now shows subcommand aliases in the completion candidates
  • Autocompletion now displays completion candidates on exact match
  • Autocompletion now supports file names containing spaces
  • Remove file name extension and local dir prefix from the command name in generated autocomplete scripts
  • Fix Bash error compopt: command not found on older versions of Bash
  • Autocompletion on ZSH should only call compinit once

Fixed issues

  • [#1440] Bugfix: annotation processor incorrectly failed with DuplicateOptionAnnotationsException when multiple commands had a subcommand in common and an inherited (scope = ScopeType.INHERIT) option. Thanks to nemetsSY for raising this.
  • [#1472] Bugfix: annotation processor option -Averbose=true no longer incorrectly triggers warning: The following options were not recognized by any processor: '[verbose]'. Thanks to Lorenz Leutgeb for raising this.
  • [#1384][#1493] Bugfix: parser now correctly handles ArgGroups with optional positional parameters. Thanks to Matthew Lewis for raising this and to Kurt Kaiser for the pull request.
  • [#1474] Bugfix: Avoid UnsupportedCharsetException: cp65001 on Microsoft Windows console when code page is set to UTF-8. Thanks to epuni for raising this.
  • [#1528][#1529] Bugfix: Allow aliases of a CommandSpec that is already a subcommand to be properly & consistently modified. Thanks to Ross Goldberg for the pull request.
  • [#1466][#1467] Bugfix/Enhancement: Autocomplete now shows subcommand aliases in the completion candidates. Thanks to Ruud Senden for the pull request.
  • [#1468] Bugfix/Enhancement: Autocompletion now displays completion candidates on exact match. Thanks to Ruud Senden for raising this.
  • [#1537][#1541] Bugfix: AbbreviationMatcher now treats aliases of the same object as one match. Thanks to Staffan Arvidsson McShane for raising this and NewbieOrange for the pull request.
  • [#1531] Bugfix: Options defined as annotated methods should reset between parseArgs invocations when CommandLine instance is reused. Thanks to kaushalkumar for raising this.
  • [#1458][#1473] Enhancement: Autocompletion now supports file names containing spaces. Thanks to zpater345 for raising this and thanks to NewbieOrange for the pull request.
  • [#1477] Enhancement: Remove file name extension and local dir prefix from the command name in generated autocomplete scripts. Thanks to Andrea Peruffo for the pull request.
  • [#1464] Enhancement: Fix Bash error compopt: command not found on older versions Bash. Thanks to Andres Almiray for raising this.
  • [#1476] Enhancement: improve error message in AbstractCommandSpecProcessor#extractTypedMember. Thanks to Ross Goldberg for raising this.
  • [#1475] Enhancement: Fix typo in annotation target-type error message. Thanks to Ross Goldberg for the pull request.
  • [#1366][#1370] Enhancement: show in usage help that the built-in help command only works on the first argument. Thanks to Patrice Duroux for the pull request.
  • [#1492] Enhancement: Use EditorConfig to define file formats and coding style; Thanks to Goooler for the pull request.
  • [#1530] Enhancement: Simplified CommandSpec#validateSubcommandName implementation. Thanks to Ross Goldberg for the pull request.
  • [#1484] Enhancement: Fixed org.junit.Assert.assertThat deprecation warning; Thanks to Ross Goldberg for the pull request.
  • [#1485] Enhancement: Fix build warnings; build doc enhancements; Thanks to Ross Goldberg for the pull request.
  • [#1483] Enhancement: Improved AbstractCommandSpecProcessor#isSubcommand; Thanks to Ross Goldberg for the pull request.
  • [#1499] Enhancement: Improved DefaultFactory#create(Class<T>). Thanks to Ross Goldberg for the pull request.
  • [#1518] Enhancement: Simplified detection of getter & setter in TypedMember constructor. Thanks to Ross Goldberg for the pull request.
  • [#1568] Enhancement: CommandLine cleanup. Thanks to Ross Goldberg for the pull request.
  • [#1526][#1548] Enhancement: Autocompletion on ZSH should only call compinit once. Thanks to Ben Herweyer for the pull request.
  • [#1539] DOC: Various documentation improvements. Thanks to Hamid Nazari for the pull request.
  • [#1481] DOC: Removed repeated "whether" typo in JavaDoc; Thanks to Ross Goldberg for the pull request.
  • [#1125][#1538] DOC: Update "Option Names or Subcommands as Option Values" section in user manual; Thanks to Scott Turner for raising this.
  • [#1409][#1463] DOC: add documentation section on using default values in argument groups. Thanks to Ben Kedo for the pull request.
  • [#1383][#1502] DOC: add tests demonstrating usage of multiple arguments. Thanks to Ben Kedo and lind6 for the pull request.
  • [#1462] DOC, BUILD, DEP: Extend documentation on argument files, fix broken/outdated links, update dependencies. Thanks to Andreas Deininger for the pull request.
  • [#1457] DOC: add caution about arguments in @files with quoted option parameters. Thanks to Andreas Deininger for the pull request.
  • [#1544][#1545] DOC: Add NOTICE file with GPL v2 + CPE license. Thanks to Keith M Swartz for the pull request.
  • [#1553] SECURITY: Fix code scanning alert - Token-Permissions
  • [#1554] SECURITY: Fix code scanning alert - Pinned-Dependencies
  • [#1555] SECURITY: Fix code scanning alert - Create SECURITY.md
  • [#1556][#1557] SECURITY: Fix code scanning alert - SAST
  • [#1558] SECURITY: Fix code scanning alert - Pinned-Dependencies in codeql-analysis.yml
  • [#1559] SECURITY: Fix code scanning alert - Token-Permissions in codeql-analysis.yml
  • [#1560] SECURITY: Fix code scanning alert - Binary-Artifacts - Validate Gradle Wrapper
  • [#1561] SECURITY: Fix code scanning alert - Doc/example code uses a broken or risky cryptographic algorithm
  • [#1562] BUILD: Rename 'master' branch to 'main'
  • [#1491] BUILD: Add build job in CI; Thanks to Goooler for the pull request.
  • [#1482] BUILD: Optimize gradle; Thanks to Goooler for the pull request.
  • [#1461] BUILD: Allow publishing without signing for non-release versions. Thanks to Andreas Deininger for raising this.
  • [#1459] BUILD: The nexus-staging Gradle plugin must be applied to the root project, not to subprojects. Thanks to Andreas Deininger for raising this.
  • [#1503] BUILD: Fix failing System.exit tests on Java 18.
  • [#1504] BUILD: Run tests on Java 6-7 in CI environment, semi-automate testing on Java 5.
  • [#1516] DEP: Remove redundant dependency on jline-console in picocli-shell-jline3. Thanks to kaushalkumar for raising this.
  • [#1495] DEP: Bump validation-api from 2.0.0.Final to 2.0.1.Final
  • [#1496] DEP: Bump biz.aQute.bnd.gradle from 5.1.2 to 6.1.0
  • [#1494] DEP: Bump kotlin-gradle-plugin from 1.5.31 to 1.6.0
  • [#1497] DEP: Bump badass-jar from 1.1.3 to 1.2.0
  • [#1498] DEP: Bump hibernate-validator from 6.1.2.Final to 7.0.1.Final
  • [#1490] DEP: Bump hibernate-validator-annotation-processor from 6.1.2.Final to 7.0.1.Final
  • [#1489] DEP: Bump log4j-core from 2.13.0 to 2.14.1
  • [#1488] DEP: Bump log4j-api from 2.13.0 to 2.14.1
  • [#1487] DEP: Bump kotlin-script-runtime from 1.5.31 to 1.6.0
  • [#1486] DEP: Bump gradle-nexus-staging-plugin from 0.21.0 to 0.30.0
  • [#1500][#1517] DEP: Bump gradle from 7.3 to 7.3.3. Thanks to Ross Goldberg for the pull request.
  • [#1569] DEP: Bump gradle from 7.3.3 to 7.4. Thanks to Ross Goldberg for the pull request.
  • [#1515] DEP: Bump kotlin-gradle-plugin from 1.6.0 to 1.6.10
  • [#1512] DEP: Bump kotlin-script-runtime from 1.6.0 to 1.6.10
  • [#1514] DEP: Bump log4j-api from 2.14.1 to 2.17.1
  • [#1513] DEP: Bump log4j-core from 2.14.1 to 2.17.1
  • [#1543] DEP: Bump asciidoctorj-pdf from 1.6.0 to 1.6.2
  • [#1547] DEP: Bump scala-library from 2.13.7 to 2.13.8
  • [#1550] DEP: Bump hibernate-validator from 7.0.1.Final to 7.0.2.Final
  • [#1551] DEP: Bump hibernate-validator-annotation-processor from 7.0.1.Final to 7.0.2.Final

Deprecations

No features were deprecated in this release.

Potential breaking changes

This release has no breaking changes.

v4.6.2

2 years ago

Picocli 4.6.2

The picocli community is pleased to announce picocli 4.6.2.

This release includes bugfixes and enhancements. Many improvements in the documentation.

Thanks to the many people in the picocli community for raising issues and contributing pull requests to fix issues!

From this release, picocli uses system properties sun.stdout.encoding and sun.stderr.encoding when creating the PrintWriters returned by CommandLine::getOut and CommandLine::getErr. When these system properties do not exist, picocli falls back to the default charset (determined by file.encoding). This addresses an issue on Windows, where the default charset is not the same as the encoding for its console (often the older cp437 codepage on English-language versions of Windows).

Note that these system properties seem to have been introduced in Java 8 (although I cannot find it in the JDK 8 release notes) and may not exist on earlier JVMs or on JVMs other than the Oracle and OpenJDK implementations.

This is the seventy-seventh public release. Picocli follows semantic versioning. Artifacts in this release are signed by Remko Popma (6601 E5C0 8DCC BB96).

Table of Contents

New and Noteworthy

Fixed issues

  • [#1422] API: Un-deprecate the @Option help attribute; it is useful for custom help options. Thanks to kaushalkumar for raising this.
  • [#1337][#1338] Enhancement: prevent spurious WARNING: tag not found in include file messages when generating man pages. Thanks to Philip Crotwell for the pull request.
  • [#1340] Enhancement: add xref to generated man page document to link to subcommands from the parent command page. Thanks to Philip Crotwell for the pull request.
  • [#1351][#1362] Enhancement: avoid calling option completionCandidates when displaying usage help if ${COMPLETION-CANDIDATES} is not specified in description. Thanks to Wenhao ZHANG, sustc11810424 and Yining Tang for the pull request.
  • [#1303] Bugfix: Prevent IllegalArgumentException: argument type mismatch error in method subcommands with inherited mixed-in standard help options. Thanks to Andreas Deininger for raising this.
  • [#1300] Bugfix: Avoid spurious warning "Could not set initial value for field boolean" when reusing CommandLine with ArgGroup. Thanks to Yashodhan Ghadge for raising this.
  • [#1316] Bugfix: Avoid DuplicateOptionAnnotationsException thrown on mixinStandardHelpOptions for subcommands when parent has scope = INHERIT by picocli-codegen annotation processor. Thanks to Philippe Charles for raising this.
  • [#1319] Bugfix: Avoid DuplicateOptionAnnotationsException when parent has inherited mixed-in help options and the built-in HelpCommand subcommand. Thanks to Andreas Deininger for raising this.
  • [#1331] Bugfix: Avoid IllegalArgumentException when parent has no standard help options and scope = INHERIT, while subcommand does have mixed-in standard help options. Thanks to Andreas Deininger for raising this.
  • [#1381][#1382] Bugfix: Default value of option in repeated subcommand was not applied correctly. Thanks to sfeuerhahn for the pull request.
  • [#1434][#1435] CommandSpec.remove(arg) should also remove the arg from the args collection in the CommandSpec. Thanks to kaushalkumar for the pull request.
  • [#1404] Bugfix/Enhancement: Print paramLabel only when it could exist. Thanks to João Guerra for the pull reqeust.
  • [#1320][#1321] Bugfix/Enhancement: Use system properties sun.stdout.encoding and sun.stderr.encoding when creating the PrintWriters returned by CommandLine::getOut and CommandLine::getErr. Thanks to Philippe Charles for the investigation and the pull request.
  • [#1431] Bugfix/enhancement: .gitattributes should include HTML files to convert CRLF to LF. Thanks to wenhoujx for pointing this out.
  • [#1388][#1430] Bugfix: Fix subcommand aliases autocomplete regression. Thanks to NewbieOrange for the pull request.
  • [#1415] Bugfix/DOC: fix NullPointerException in README Example. Thanks to shannonbay for raising this.
  • [#1421] Bugfix/DOC: execute method in RunAll, RunFirst and RunLast should not be deprecated. Thanks to Gamal DeWeever for raising this.
  • [#1326][#1339] DOC: Added documentation and examples for controlling the locale. Thanks to Andreas Deininger for the pull request.
  • [#1296] DOC: add Kotlin code samples to user manual; other user manual improvements. Thanks to Andreas Deininger for the pull request.
  • [#1299] DOC: Link to IParameterPreprocessor from IParameterConsumer javadoc. Thanks to Andreas Deininger for the pull request.
  • [#1304] DOC: Manual, chapter '17.9 Inherited Command Attributes': added Kotlin version of code sample. Thanks to Andreas Deininger for the pull request.
  • [#1305] DOC: Document use of IParameterConsumer as n-ary type converter. Thanks to Martin for raising this.
  • [#1307] DOC: Added CAUTION admonitions, Kotlin code sample. Thanks to Andreas Deininger for the pull request.
  • [#1308] DOC: Add example for Option converter, improve text for default values. Thanks to Abhijit Sarkar for raising this.
  • [#1314] DOC: Fix use of deprecated Maven properties in README. Thanks to Philippe Charles for the pull request.
  • [#1323] DOC: Update Testing section of the user manual for Stefan Birkner's library System-Lambda.
  • [#1325] DOC: Add section on Short and Long Option Columns to user manual. Thanks to Andrei Ciobanu for raising this.
  • [#1336] DOC: Kotlin sample code, documentation improvements. Thanks to Andreas Deininger for the pull request.
  • [#1342] DOC: Improve user manual chapter 28.3 'Testing the Exit Code'. Thanks to Andreas Deininger for the pull request.
  • [#1344] DOC: Documentation, chapter 'Testing environment variables:': add Kotlin test sample. Thanks to Andreas Deininger for the pull request.
  • [#1443] DOC: Fix incorrect method name setLongOptionsMaxWidth to setUsageHelpLongOptionsMaxWidth in user manual section 'Long Option Column Width'. Thanks to kunlk for raising this.
  • [#1360][#1359] DOC: add JReleaser as packaging option. Thanks to Andres Almiray for the pull request.
  • [#1363][#1364] DOC: Add caution on Variable interpolation in Kotlin. Thanks to MagnusMG for the pull request.
  • [#1397][#1399] DOC: Update Jline2 README.md to add some recommended workaround about ANSI incompatible terminals. Thanks to Simon for the pull request.
  • [#1398][#1400] DOC: Arity of boolean options is now documented correctly. Thanks to João Guerra for the pull request.
  • [#1428][#1433] DOC: Add section about subcommands with the same name as option default value. Thanks to cbcmg for the pull request.
  • [#1390][#1432] DOC: Update examples to not throw Exception from main method. Thanks to wenhoujx for the pull request.
  • [#1423] DOC: Fixed broken link in README.md to annotation processor documentation. Thanks to Sevy007 for raising this.
  • [#1449] DOC: Fix typo in picocli-shell-jline2/README.md. Thanks to Ahmed Ashour for the pull request.
  • [#1426] Fix README adoption logos. Thanks to NewbieOrange for the pull request.
  • [#1313] DEP: Bump jline3Version in order to avoid stackoverflow error. Thanks to Rupert Madden-Abbott for the pull request.
  • [#1455] DEP: Bump spring-boot version to 2.5.6.
  • [#1369][#1371] Upgrade jline3 to version 3.19.0 to avoid "ReadConsoleInputW failed: Incorrect function" error. Thanks to auricgoldfinger for the pull request.
  • [#1336] BUILD: Bump Spring Boot, Gradle and Kotlin to latest version. Thanks to Andreas Deininger for the pull request.
  • [#1327] BUILD: fix incorrect version in MANIFEST.MF. Thanks to Fiouz for the pull request.
  • [#1328] BUILD: Upgrade Gradle to 6.8.2 and enable official Gradle Wrapper Validation GitHub Action. Thanks to Fiouz for the pull request.
  • [#1329] BUILD: OSGi manifest entry in picocli-4.6.0.jar should not require groovy. Thanks to Fiouz for raising this.
  • [#1330] BUILD: use type-safe DSL instead of direct XML manipulation to generate pom.xml. Thanks to Fiouz for the pull request.
  • [#1332] BUILD: Bumping asciidoctor + asciidoctor gradle plugin to latest versions. Thanks to Andreas Deininger for the pull request.
  • [#1413] BUILD: Improve Travis CI build Performance. Thanks to YunLemon for the pull request.
  • [#1322] BUILD: switch from Bintray jcenter to Maven Central.

Deprecations

No features were deprecated in this release.

The @Option help attribute is no longer deprecated from this release; it is useful for custom help options.

Potential breaking changes

This release has no breaking changes.

v4.6.1

3 years ago

Picocli 4.6.1

The picocli community is pleased to announce picocli 4.6.1.

This release fixes a problem (introduced in the 4.6.0 release) with dependency scope in the following sub-modules:

  • picocli-codegen
  • picocli-groovy
  • picocli-shell-jline2
  • picocli-shell-jline3
  • picocli-spring-boot-starter

The problem was that these modules contained dependencies that were declared to have implementation scope instead of api scope. However, these were transitive dependencies, and necessary to compile any project that uses the above picocli modules.

In this release, transitive dependencies are declared with api scope in the above modules.

Special thanks to Sualeh Fatehi, Dejan Stojadinović and Semyon Levin for the quick community feedback, pull request and reviews!

This is the seventy-sixth public release. Picocli follows semantic versioning.

Table of Contents

New and Noteworthy

Fixed issues

  • [#1291] Fix dependency scope for picocli-shell-jline3. Thanks to Sualeh Fatehi for raising this.
  • [#1292] PR to fix dependency scope for picocli-shell-jline3. Thanks to Dejan Stojadinović for the pull request, and Semyon Levin for the review.
  • [#1294] Fix dependency scope for picocli-spring-boot-starter. Thanks to Semyon Levin for raising this.

Deprecations

No features were deprecated in this release.

Potential breaking changes

This release has no breaking changes.

v4.6.0

3 years ago

Picocli 4.6.0

The picocli community is pleased to announce picocli 4.6.0.

This release contains new features, bug fixes and other enhancements.

Community Contributions

This release contains many, many community contributions, for which I am extremely grateful. Let's give the contributors some credit!

  • Andreas Deininger has been contributing to the documentation and other areas for a long time, but recently went into overdrive :-) and contributed many, many new pull requests to improve the documentation. The user manual and Quick Guide now have a "foldable" table of contents, and examples in tabs, with many additional examples in Kotlin, Scala and Groovy. A lot of work went into this! Many thanks, Andreas!
  • Marko Mackic contributed a pull request to add IModelTransformer API for user-defined model transformations after initialization and before parsing.
  • Sualeh Fatehi contributed a pull request to the picocli-shell-jline3 module that adds a built-in clear command and improves the help command.
  • H.Sakata contributed a pull request that adds support for echo and prompt for interactive options and positional parameters.
  • Daniel Gray contributed a bug fix to prevent incorrectly defaulting inherited positional params after a subcommand.
  • nveeser-google contributed a fix for compiler warnings about Annotation::getClass and assignment in if condition.
  • Petr Hála contributed a pull request to add a section on Mocking to user manual.
  • Max Rydahl Andersen contributed a pull request to include jbang in the Build Tools section of the user manual.
  • David Phillips contributed a section to the user manual on Really Executable JARs.
  • Laurent Almeras contributed a pull request to fix the user manual: @ParentObject should be @ParentCommand.
  • Mattias Andersson raised the idea of supporting subcommand methods in Groovy scripts.
  • Adrian A. raised the idea of using closures in the picocli annotations in Groovy programs instead of specifying a class.
  • Nick Cross raised the idea of inheriting @Command attributes with scope=INHERIT.
  • Marko Mackic raised the idea of adding a CommandSpec::removeSubcommand method.
  • Max Rydahl Andersen raised the idea of supporting Optional<T> type for options and positional parameters.
  • Max Rydahl Andersen and David Walluck raised the idea of supporting key-only Map options (to support -Dkey as well as -Dkey=value).
  • David Walluck raised the idea of a "preprocessor" parser plugin.
  • Jannick Hemelhof raised the idea of supporting @Spec-annotated members in ArgGroup classes.
  • Vitaly Shukela raised a bug report: the error message for unmatched positional argument reports an incorrect index when value equals a previously matched argument.
  • drkilikil raised a bug report: MissingParameterException should not be thrown when subcommand has required options and help option is specified on parent command.
  • Sebastian Thomschke raised a bug report: ReflectionConfigGenerator should not generate method section in subclass config for private superclass methods in reflect-config.json.
  • Lukas Heumos added the picocli-based cli-java template to CookieTemple.
  • Sualeh Fatehi raised the idea of adding add CommandLine::getFactory accessor method.
  • David Walluck contributed a test improvement that allows the tests to run reliably in more environments.
  • Sabrina (link witheld) pointed out various typos in the documentation.

What is in this release

Improved Groovy support: this release introduces a new @PicocliScript2 annotation that adds support for exit codes and @Command-annotated methods to define subcommands. Also, from this release, Groovy programs can use closures in the picocli annotations instead of specifying a class.

From this release, Map options accept key-only parameters, so end users can specify -Dkey as well as -Dkey=value. There is a new mapFallbackValue attribute that enables this, which can be used to control the value that is put into the map when only a key was specified on the command line.

Also, this release adds support for java.util.Optional<T>: single-value types can be wrapped in an Optional container object when running on Java 8 or higher. If the option or positional parameter was not specified on the command line, picocli assigns the value Optional.empty() instead of null.

This release also adds support for commands with scope = ScopeType.INHERIT. Commands with this scope have their attributes copied to all subcommands (and sub-subcommands).

New parser plugin: IParameterPreprocessor and new configuration plugin: IModelTransformer.

From this release, @Spec-annotated elements can be used in ArgGroup classes, which can be convenient for validation.

Interactive options and positional parameters can now set echo = true (for non-security sensitive data) so that user input is echoed to the console, and control the prompt text that is shown before asking the user for input.

Help API: this release adds public methods Help.Layout::colorScheme, Help.Layout::textTable, Help.Layout::optionRenderer, Help.Layout::parameterRenderer, and Help::calcLongOptionColumnWidth, making it easier to customize the table format used to lay out options and positional parameters in the usage help message.

CommandSpec API: added method CommandSpec::removeSubcommand.

This is the seventy-fifth public release. Picocli follows semantic versioning.

Table of Contents

New and Noteworthy

New @PicocliScript2 annotation

The older @picocli.groovy.PicocliScript annotation is deprecated from picocli 4.6. New scripts should use the @picocli.groovy.PicocliScript2 annotation (and associated picocli.groovy.PicocliBaseScript2 base class) instead. The table below lists the differences between the PicocliBaseScript2 and PicocliBaseScript script base classes.

PicocliBaseScript2 PicocliBaseScript
Subcommands can be defined as @Command-annotated methods in the script. No support for @Command-annotated methods.
Support for help subcommands (both the built-in one and custom ones). No support for help subcommands.
Exit code support: scripts can override afterExecution(CommandLine, int, Exception) to call System.exit. No support for exit code.
Invokes CommandLine::execute. Scripts can override beforeParseArgs(CommandLine) to install a custom IExecutionStrategy. Execution after parsing is defined in PicocliBaseScript::run and is not easy to customize. Any subcommand and the main script are both executed.
Scripts can override beforeParseArgs(CommandLine) to install a custom IParameterExceptionHandler. Invalid input handling can be customized by overriding PicocliBaseScript::handleParameterException.
Scripts can override beforeParseArgs(CommandLine) to install a custom IExecutionExceptionHandler. Runtime exception handling can be customized by overriding PicocliBaseScript::handleExecutionException.
Implements Callable<Object>, script body is transformed to the call method. Script body is transformed to the runScriptBody method.

Groovy Closures in Annotations

From picocli 4.6, Groovy programs can use closures in the picocli annotations instead of specifying a class. This can be especially useful in Groovy scripts, where one cannot define a static inner class.

Example:

@Command(name = "ClosureDemo",
        versionProvider = {
            { -> ["line1" , "line2"] as String[] } as IVersionProvider // <1>
        },
        defaultValueProvider = {
            { argSpec -> "some default" } as IDefaultValueProvider // <2>
        })
class ClosureDemo {
    @Option(names = '-x', completionCandidates = {["A", "B", "C"]}) // <3>
    String x

    @Option(names = '-y',
            parameterConsumer = {
                { args, argSpec, commandSpec ->  // <4>
                    argSpec.setValue(args.toString() + commandSpec.name())
                    args.clear()
                } as IParameterConsumer
            })
    String y

    @Option(names = '-z', converter = [ // requires Groovy 3.0.7
            { { str -> MessageDigest.getInstance(str) } as ITypeConverter } // <5>
    ])
    MessageDigest z
}

When a class is specified, picocli creates an instance of the class. By contrast, when a closure is specified, picocli calls the closure to get an instance. (To be precise, both of these are delegated to the configured factory, and the default factory implementation supports closures from picocli 4.6.)

As you can see in the above example, each closure in the annotation should contain another closure that has the required type (IVersionProvider, IDefaultValueProvider, etc.)

  • <1> Command versionProvider: note the empty parameter list before the -> arrow. This is needed to help the Groovy compiler. The closure must be cast to IVersionProvider.
  • <2> Command defaultProvider: return a default value for the specified ArgSpec parameter. The closure must be cast to IDefaultValueProvider.
  • <3> Option or Parameters completionCandidates: return a list of Strings. No parameter list or casting is required.
  • <4> Option or Parameters parameterConsumer: given a Stack, ArgSpec and CommandSpec, process the remaining arguments. The closure must be cast to IParameterConsumer.
  • <5> Option or Parameters type converter takes an array of closures. Groovy 3.0.7 or greater is required: older versions of Groovy ignore closures in class array annotations. Each closure must have a parameter and be cast to ITypeConverter.

Key-only map parameters

By default, picocli expects Map options and positional parameters to look like key=value, that is, the option parameter or positional parameter is expected to have a key part and a value part, separated by a = character. If this is not the case, picocli shows a user-facing error message: Value for ... should be in KEY=VALUE format but was ....

From picocli 4.6, applications can specify a mapFallbackValue to allow end users to specify only the key part. The specified mapFallbackValue is put into the map when end users to specify only a key. The value type can be wrapped in a java.util.Optional. For example:

@Option(names = {"-P", "--properties"}, mapFallbackValue = Option.NULL_VALUE)
Map<String, Optional<Integer>> properties;

@Parameters(mapFallbackValue = "INFO", description = "... ${MAP-FALLBACK-VALUE} ...")
Map<Class<?>, LogLevel> logLevels;

This allows input like the following:

<cmd> --properties=key1 -Pkey2 -Pkey3=3 org.myorg.MyClass org.myorg.OtherClass=DEBUG

The above input would give the following results:

properties = [key1: Optional.empty, key2: Optional.empty, key3: Optional[3]]
logLevels  = [org.myorg.MyClass: INFO, org.myorg.OtherClass: DEBUG]

Note that the option description may contain the ${MAP-FALLBACK-VALUE} variable which will be replaced with the actual map fallback value when the usage help is shown.

System Properties

A common requirement for command line applications is to support the -Dkey=value syntax to allow end users to set system properties.

The example below uses the Map type to define an @Option-annotated method that delegates all key-value pairs to System::setProperty. Note the use of mapFallbackValue = "" to allow key-only option parameters.

class SystemPropertiesDemo {
    @Option(names = "-D", mapFallbackValue = "") // allow -Dkey
    void setProperty(Map<String, String> props) {
        props.forEach((k, v) -> System.setProperty(k, v));
    }
}

java.util.Optional<T>

From version 4.6, picocli supports single-value types wrapped in a java.util.Optional container when running on Java 8 or higher. If the option or positional parameter was not specified on the command line, picocli assigns the value Optional.empty() instead of null. For example:

@Option(names = "-x")
Optional<Integer> x;

@Option(names = "-D", mapFallbackValue = Option.NULL_VALUE)
Map<String, Optional<Integer>> map;

WARNING: Picocli has only limited support for java.util.Optional types: only single-value types, and the values in a Map (but not the keys!) can be wrapped in an Optional container. java.util.Optional cannot be combined with arrays or other Collection classes.

Inherited Command Attributes

Picocli 4.6 adds support for inheriting @Command attributes with the scope = ScopeType.INHERIT annotation. Commands with this scope have their @Command attributes copied to all subcommands (and sub-subcommands, to any level of depth).

When a subcommand specifies an explicit value in its @Command annotation, this value is used instead of the inherited value. For example:

@Command(name = "app", scope = ScopeType.INHERIT,
        mixinStandardHelpOptions = true, version = "app version 1.0",
        header = "App header",
        description = "App description",
        footerHeading = "Copyright%n", footer = "(c) Copyright by the authors",
        showAtFileInUsageHelp = true)
class App implements Runnable {
    @Option(names = "-x") int x;

    public void run() { System.out.printf("Hello from app %d%n!", x); }

    @Command(header = "Subcommand header", description = "Subcommand description")
    void sub(@Option(names = "-y") int y) {
        System.out.printf("Hello app sub %d%n!", y);
    }
}

The app command in the above example has scope = ScopeType.INHERIT, so its @Command properties are inherited by the sub subcommand.

The sub subcommand defines its own header and description, so these are not inherited from the parent command. The help message for the subcommand looks like this:

Subcommand header
Usage: app sub [-hV] [-y=<arg0>] [@<filename>...]
Subcommand description
      [@<filename>...]   One or more argument files containing options.
  -h, --help             Show this help message and exit.
  -V, --version          Print version information and exit.
  -y=<arg0>
Copyright
(c) Copyright by the authors

Note that the subcommand has inherited the mixed-in standard help options (--help and --version), the @file usage help, and the footer and footer heading. It also inherited the version string, shown when the user invokes app sub --version.

When a command has scope = INHERIT, the following attributes are copied to its subcommands:

  • all usage help attributes: description, descriptionHeading, header, headerHeading, footer, footerHeading, customSynopsis, synopsisHeading, synopsisSubcommandLabel, abbreviateSynopsis, optionListHeading, parameterListHeading, commandListHeading, exitCodeList, exitCodeListHeading, requiredOptionMarker, showDefaultValues, sortOptions, autoWidth, width, showAtFileInUsageHelp, showEndOfOptionsDelimiterInUsageHelp, and hidden
  • exit codes: exitCodeOnSuccess, exitCodeOnUsageHelp, exitCodeOnVersionHelp, exitCodeOnInvalidInput, exitCodeOnExecutionException
  • the help and version options mixed in by mixinStandardHelpOptions
  • separator between option and option parameter
  • version
  • versionProvider
  • defaultValueProvider
  • subcommandsRepeatable
  • whether this command is a helpCommand

Attributes that are not copied include:

  • command name
  • command aliases
  • options and parameters (other than the help and version options mixed in by mixinStandardHelpOptions)
  • other mixins than mixinStandardHelpOptions
  • subcommands
  • argument groups

Preprocessor Parser Plugin

Introduced in picocli 4.6, the IParameterPreprocessor is also a parser plugin, similar to IParameterConsumer, but more flexible.

Options, positional parameters and commands can be assigned a IParameterPreprocessor that implements custom logic to preprocess the parameters for this option, position or command. When an option, positional parameter or command with a custom IParameterPreprocessor is matched on the command line, picocli's internal parser is temporarily suspended, and this custom logic is invoked.

This custom logic may completely replace picocli's internal parsing for this option, positional parameter or command, or augment it by doing some preprocessing before picocli's internal parsing is resumed for this option, positional parameter or command.

The "preprocessing" actions can include modifying the stack of command line parameters, or modifying the model.

Example use case

This may be useful when disambiguating input for commands that have both a positional parameter and an option with an optional parameter. For example, suppose we have a command with the following synopsis:

edit [--open[=<editor>]] <file>

One of the limitations of options with an optional parameter is that they are difficult to combine with positional parameters.

With a custom parser plugin, we can customize the parser, such that VALUE in --option=VALUE is interpreted as the option parameter, and in --option VALUE (without the = separator), VALUE is interpreted as the positional parameter. The code below demonstrates:

@Command(name = "edit")
class Edit {

    @Parameters(index = "0", description = "The file to edit.")
    File file;

    enum Editor { defaultEditor, eclipse, idea, netbeans }

    @Option(names = "--open", arity = "0..1", preprocessor = Edit.MyPreprocessor.class,
        description = {
            "Optionally specify the editor to use; if omitted the default editor is used. ",
            "Example: edit --open=idea FILE opens IntelliJ IDEA (notice the '=' separator)",
            "         edit --open FILE opens the specified file in the default editor"
        })
    Editor editor = Editor.defaultEditor;
    
    static class MyPreprocessor implements IParameterPreprocessor {
        public boolean preprocess(Stack<String> args,
                                  CommandSpec commandSpec,
                                  ArgSpec argSpec,
                                  Map<String, Object> info) {
            // we need to decide whether the next arg is the file to edit
            // or the name of the editor to use...
            if (" ".equals(info.get("separator"))) { // parameter was not attached to option

                // act as if the user specified --open=defaultEditor
                args.push(Editor.defaultEditor.name());
            }
            return false; // picocli's internal parsing is resumed for this option
        }
    }
}

With this preprocessor, the following user input gives the following command state:

# User input # Command State
# --------------------------
--open A B   # editor: defaultEditor, file: A,    unmatched: [B]
--open A     # editor: defaultEditor, file: A,    unmatched: []
--open=A B   # editor: A,             file: B,    unmatched: []
--open=A     # editor: A,             file: null, unmatched: []

Model Transformations

From picocli 4.6, it is possible to use the annotations API to modify the model (commands, options, subcommands, etc.) dynamically at runtime. The @Command annotation now has a modelTransformer attribute where applications can specify a class that implements the IModelTransformer interface:

This allows applications to dynamically add or remove options, positional parameters or subcommands, or modify the command in any other way, based on some runtime condition.

@Command(modelTransformer = Dynamic.SubCmdFilter.class)
class Dynamic {

    private static class SubCmdFilter implements IModelTransformer {
        public CommandSpec transform(CommandSpec commandSpec) {
            if (Boolean.getBoolean("disable_sub")) {
                commandSpec.removeSubcommand("sub");
            }
            return commandSpec;
        }
    }

    @Command
    private void sub() {
        // subcommand business logic
    }
}

Fixed issues

  • [#1164] API: Add support for @Command(scope=INHERIT). Thanks to Nick Cross for raising this.
  • [#1191] API: Add @PicocliScript2 annotation to support subcommand methods in Groovy scripts. Thanks to Mattias Andersson for raising this.
  • [#1241] API: Add mapFallbackValue attribute to @Options and @Parameters annotations, and corresponding ArgSpec.mapFallbackValue().
  • [#1217] API: Add IParameterPreprocessor parser plugin to invoke custom logic when a command, option or positional parameter is matched. Thanks to David Walluck for raising this.
  • [#1259][#1266] API: Add IModelTransformer to support user-defined model transformations after initialization and before parsing. Thanks to Marko Mackic for the pull request.
  • [#802][#1284] API: Add support for echo and prompt in for interactive options and positional parameters. Thanks to H.Sakata for the pull request.
  • [#1184] API: Added public methods Help.Layout::colorScheme, Help.Layout::textTable, Help.Layout::optionRenderer, Help.Layout::parameterRenderer, and Help::calcLongOptionColumnWidth.
  • [#1254] API: Added ArgSpec::root: this method returns the original ArgSpec for inherited ArgSpec objects, and null for other ArgSpec objects. Thanks to Daniel Gray for the pull request.
  • [#1256] API: Added CommandSpec::removeSubcommand method. Thanks to Marko Mackic for raising this.
  • [#1258] API: Groovy programs can now use closures in the picocli annotations instead of specifying a class. Thanks to Adrian A. for raising this.
  • [#1267] API: Add CommandLine::getFactory accessor for the factory. Thanks to Sualeh Fatehi for the suggestion.
  • [#1108] Enhancement: Support Optional<T> type for options and positional parameters. Thanks to Max Rydahl Andersen for raising this.
  • [#1214] Enhancement: Support Map options with key-only (support -Dkey as well as -Dkey=value). Thanks to Max Rydahl Andersen and David Walluck for raising this and subsequent discussion.
  • [#1260] Enhancement: Support @Spec-annotated members in ArgGroup classes. Thanks to Jannick Hemelhof for raising this.
  • [#1265] Enhancement in picocli-shell-jline3: add built-in clear command and improve help command. Thanks to Sualeh Fatehi for the pull request.
  • [#1236] Enhancement/bugfix: Fix compiler warnings about Annotation::getClass and assignment in if condition. Thanks to nveeser-google for the pull request.
  • [#1229] Bugfix: Fix compilation error introduced with fc5ef6de6 (#1184). Thanks to Andreas Deininger for the pull request.
  • [#1225] Bugfix: Error message for unmatched positional argument reports an incorrect index when value equals a previously matched argument. Thanks to Vitaly Shukela for raising this.
  • [#1250] Bugfix: Inherited positional parameter should not be overridden by default value if placed after subcommand. Thanks to Daniel Gray for the pull request.
  • [#1183] Bugfix: Prevent MissingParameterException thrown when subcommand has required options and help option is specified on parent command. Thanks to drkilikil for raising this.
  • [#1273] Bugfix: The Help.calcLongOptionColumnWidth now calls Help.createDefaultOptionRenderer, so overriding createDefaultOptionRenderer uses the correct column width in the options and parameters list.
  • [#1274] Bugfix: ReflectionConfigGenerator should not generate method section in subclass config for private superclass methods in reflect-config.json. Thanks to Sebastian Thomschke for raising this.
  • [#1215] DOC: User manual improvements, including more tabs with Kotlin source code. Thanks to Andreas Deininger for the pull request.
  • [#1219] DOC: User manual improvements: added more tabs with Kotlin code. Thanks to Andreas Deininger for the pull request.
  • [#1220] DOC: User manual improvements: corrections, more Kotlin tabs. Thanks to Andreas Deininger for the pull request.
  • [#1221] DOC: User manual improvements: add tabs with Kotlin code for samples (chapter 14: Usage help). Thanks to Andreas Deininger for the pull request.
  • [#1222] DOC: User manual improvements: add tabs with Kotlin code for samples (chapter 7 + 12). Thanks to Andreas Deininger for the pull request.
  • [#1223] DOC: User manual improvements: add tabs with Kotlin code for samples (chapter 10: Validation). Thanks to Andreas Deininger for the pull request.
  • [#1224] DOC: User manual improvements: add tabs with Kotlin code for samples (chapter 5: Default Values). Thanks to Andreas Deininger for the pull request.
  • [#1226] DOC: User manual improvements: add tabs with Kotlin code for samples (chapter 9.6 - 9.8: Executing commands). Thanks to Andreas Deininger for the pull request.
  • [#1228] DOC: User manual improvements: add tabs with Kotlin code for samples (chapters 8, 16, 20). Thanks to Andreas Deininger for the pull request.
  • [#1230] DOC: User manual improvements: add tabs with Kotlin code for samples (Chapters 6, 11, 15, 19). Thanks to Andreas Deininger for the pull request.
  • [#1232] DOC: User manual improvements for Micronaut example: add Kotlin version, extended description of Micronaut usage. Thanks to Andreas Deininger for the pull request.
  • [#1233] DOC: User manual improvements: add tabs with Kotlin code for samples (Chapter 21: Tips & Tricks). Thanks to Andreas Deininger for the pull request.
  • [#1234] DOC: add system properties example to user manual.
  • [#1235][#1238] DOC: User manual: update DI section on Quarkus. Thanks to Andreas Deininger for the pull request.
  • [#1246] DOC: User manual improvements: Guice and Spring Boot examples: add Kotlin versions. Thanks to Andreas Deininger for the pull request.
  • [#1242] DOC: "Foldable" table of contents for User Manual and Quick Guide. Thanks to Andreas Deininger for the pull request.
  • [#1247] DOC: User manual: extended Spring Boot example. Thanks to Andreas Deininger for the pull request.
  • [#1249] DOC: Added section on Mocking to user manual. Thanks to Petr Hála for the pull request.
  • [#1244] DEP: Bump Spring-Boot-Starter version to 2.3.5.RELEASE. Thanks to Andreas Deininger for the pull request.
  • [#1289] DEP: Bump Spring boot dependency to 2.4.1. Thanks to Andreas Deininger for the pull request.
  • [#1248] BUILD: Fix gradle warnings. Thanks to Andreas Deininger for the pull request.
  • [#1280] BUILD: Remove trailing comment from gradle.properties to prevent build error. Thanks to David Walluck for raising this.
  • [#1253] DOC: Fix line endings to LF in documentation files. Thanks to Daniel Gray for the pull request.
  • [#1255] DOC: User manual and Quick Guide: add Groovy, Kotlin and Scala examples. Thanks to Andreas Deininger for the pull request.
  • [#1261] DOC: User manual improvements: add Scala code samples. Thanks to Andreas Deininger for the pull request.
  • [#1262] DOC: User manual: include jbang in the Build Tools section. Thanks to Max Rydahl Andersen for the pull request.
  • [#1263] DOC: User manual: show build scripts in tabs. Thanks to Andreas Deininger for the pull request.
  • [#1264] DOC: Fix broken links to GraalVm native image build configuration. Thanks to Andreas Deininger for the pull request.
  • [#1005] DOC: Add link to the CookieTemple cli-java template README. Thanks to Lukas Heumos for getting this added to CookieTemple.
  • [#1276] DOC: User manual: add section for "really executable JARs". Thanks to David Phillips for the pull request.
  • [#1286] DOC: Fix: @ParentObject should be @ParentCommand. Thanks to Laurent Almeras for the pull request.
  • [#1290] DOC: JLine: change keystroke syntax 'Ctl-D' to more common used syntax 'Ctrl-D'. Thanks to Andreas Deininger for the pull request.
  • [#1270] TEST: Fix issue #1103 in Issue1225UnmatchedArgBadIndex. Thanks to David Walluck for the pull request.

Deprecations

From this release, the @picocli.groovy.PicocliScript annotation in the picocli-groovy module is deprecated in favor of @picocli.groovy.PicocliScript2, and the picocli.groovy.PicocliBaseScript class is deprecated in favor of picocli.groovy.PicocliBaseScript2.

Potential breaking changes

Added method isOptional() to the picocli.CommandLine.Model.ITypeInfo interface.