Skip to content

Commit

Permalink
Release picocli version 4.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
remkop committed Nov 22, 2019
1 parent a92e794 commit 6389c43
Show file tree
Hide file tree
Showing 129 changed files with 2,272 additions and 986 deletions.
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ The user manual has an [example](https://picocli.info/#_guice_example) of integr

### Releases
* [All Releases](https://github.com/remkop/picocli/releases)
* Latest: 4.0.4 [Release Notes](https://github.com/remkop/picocli/releases/tag/v4.0.4)
* Latest: 4.1.0 [Release Notes](https://github.com/remkop/picocli/releases/tag/v4.1.0)
* Older: Picocli 4.0 [Release Notes](https://github.com/remkop/picocli/releases/tag/v4.0.0)
* Older: Picocli 3.0 [Release Notes](https://github.com/remkop/picocli/releases/tag/v3.0.0)
* Older: Picocli 2.0 [Release Notes](https://github.com/remkop/picocli/releases/tag/v2.0.0)
Expand Down Expand Up @@ -163,9 +163,9 @@ Join the [picocli Google group](https://groups.google.com/d/forum/picocli) if yo
Glad to see more people are using picocli. We must be doing something right. :-)

### Help to promote picocli
If you like picocli and your project is on GitHub, consider adding this badge to your README.md: [![picocli](https://img.shields.io/badge/picocli-4.0.4-green.svg)](https://github.com/remkop/picocli)
If you like picocli and your project is on GitHub, consider adding this badge to your README.md: [![picocli](https://img.shields.io/badge/picocli-4.1.0-green.svg)](https://github.com/remkop/picocli)
```
[![picocli](https://img.shields.io/badge/picocli-4.0.4-green.svg)](https://github.com/remkop/picocli)
[![picocli](https://img.shields.io/badge/picocli-4.1.0-green.svg)](https://github.com/remkop/picocli)
```


Expand Down Expand Up @@ -253,35 +253,35 @@ See the [source code](https://github.com/remkop/picocli/blob/master/src/main/jav

### Gradle
```
compile 'info.picocli:picocli:4.0.4'
compile 'info.picocli:picocli:4.1.0'
```
### Maven
```
<dependency>
<groupId>info.picocli</groupId>
<artifactId>picocli</artifactId>
<version>4.0.4</version>
<version>4.1.0</version>
</dependency>
```
### Scala SBT
```
libraryDependencies += "info.picocli" % "picocli" % "4.0.4"
libraryDependencies += "info.picocli" % "picocli" % "4.1.0"
```
### Ivy
```
<dependency org="info.picocli" name="picocli" rev="4.0.4" />
<dependency org="info.picocli" name="picocli" rev="4.1.0" />
```
### Grape
```groovy
@Grapes(
@Grab(group='info.picocli', module='picocli', version='4.0.4')
@Grab(group='info.picocli', module='picocli', version='4.1.0')
)
```
### Leiningen
```
[info.picocli/picocli "4.0.4"]
[info.picocli/picocli "4.1.0"]
```
### Buildr
```
'info.picocli:picocli:jar:4.0.4'
'info.picocli:picocli:jar:4.1.0'
```
79 changes: 44 additions & 35 deletions RELEASE-NOTES.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,21 @@
# picocli Release Notes


# <a name="4.1.0"></a> Picocli 4.1.0 (UNRELEASED)
# <a name="4.1.0"></a> Picocli 4.1.0
The picocli community is pleased to announce picocli 4.1.0.

This release contains bugfixes and enhancements.
This release contains bugfixes, and enhancements.

The library now provides functionality that previously required custom code:

[PropertiesDefaultProvider](#4.1.0-PropertiesDefaultProvider) - this release includes a built-in default provider allows end users to maintain their own default values for options and positional parameters, which may override the defaults that are hard-coded in the application.

[AutoComplete.GenerateCompletion](#4.1.0-Completion) - this release includes a built-in `generate-completion` subcommand that end users can use to easily install Bash/ZSH completion for your application.

[Help API improvements](#4.1.0-HelpAPI) make it even easier to add custom sections to the usage help message.

This release also includes various bug fixes for [ArgGroups](#4.1.0-ArgGroups), which were first introduced in picocli 4.0, and are still maturing.

This is the sixty-second public release.
Picocli follows [semantic versioning](http://semver.org/).

Expand All @@ -18,7 +27,7 @@ Picocli follows [semantic versioning](http://semver.org/).

## <a name="4.1.0-new"></a> New and Noteworthy

### PropertiesDefaultProvider
### <a name="4.1.0-PropertiesDefaultProvider"></a> PropertiesDefaultProvider
From picocli 4.1, applications can use the built-in `PropertiesDefaultProvider`
implementation that loads default values from a properties file.

Expand Down Expand Up @@ -65,8 +74,38 @@ git.commit.cleanup = strip
```


### <a name="4.1.0-Completion"></a> AutoComplete.GenerateCompletion

This release adds a built-in `generate-completion` subcommand that generates a completion script for its parent command.

Example usage:

```java
@Command(name = "myapp",
subcommands = picocli.AutoComplete.GenerateCompletion.class)
static class MyApp { //...
}
```

This allows users to install completion for the `myapp` command by running the following command:

```bash
source <(myapp generate-completion)
```

### Autocompletion script improvements

The generated completion script itself now enables bash completion in zsh.

That means it is no longer necessary to run the below commands in ZSH before sourcing the completion script:

### Help API improvements
```zsh
autoload -U +X compinit && compinit
autoload -U +X bashcompinit && bashcompinit
```


### <a name="4.1.0-HelpAPI"></a> Help API improvements
The new `Help.createHeading(String, Object...)` and `Help.createTextTable(Map<?, ?>)` methods
facilitate creating tabular custom Help sections.

Expand Down Expand Up @@ -102,44 +141,14 @@ cmd.setHelpSectionKeys(keys);

There are also new convenience methods `Help.fullSynopsis()` and `CommandLine.getHelp()`.

### ArgGroup improvements
### <a name="4.1.0-ArgGroups"></a> ArgGroup improvements

* ArgGroups with `@Option`-annotated methods no longer fail with `NullPointerException`
* ArgGroups now match multiple occurrences of a multi-value `@Option` in the same group instance, and don't create a new group for each occurrence
* ArgGroups now don't validate when marked as `validate = false`
* ArgGroups now correctly validate that required options are present
* Non-validating ArgGroups are now automatically set to be non-exclusive

### AutoComplete.GenerateCompletion

This release adds a built-in `generate-completion` subcommand that generates a completion script for its parent command.

Example usage:

```java
@Command(name = "myapp",
subcommands = picocli.AutoComplete.GenerateCompletion.class)
static class MyApp { //...
}
```

This allows users to install completion for the `myapp` command by running the following command:

```bash
source <(myapp generate-completion)
```

### Autocompletion script improvements

The generated completion script itself now enables bash completion in zsh.

That means it is no longer necessary to run the below commands in ZSH before sourcing the completion script:

```zsh
autoload -U +X compinit && compinit
autoload -U +X bashcompinit && bashcompinit
```

## <a name="4.1.0-fixes"></a> Fixed issues
* [#841] (API) Add `JniConfigGenerator` to `picocli-codegen` module.
* [#865] (API) Add `Help.createHeading(String, Object...)` and `Help.createTextTable(Map<?, ?>)` to facilitate creating tabular custom Help sections.
Expand Down
8 changes: 5 additions & 3 deletions docs/apidocs/allclasses-frame.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (1.8.0_202) on Mon Sep 09 06:52:51 JST 2019 -->
<title>All Classes (picocli 4.0.4 API)</title>
<meta name="date" content="2019-09-09">
<!-- Generated by javadoc (1.8.0_202) on Fri Nov 22 18:38:44 JST 2019 -->
<title>All Classes (picocli 4.1.0 API)</title>
<meta name="date" content="2019-11-22">
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
<script type="text/javascript" src="script.js"></script>
</head>
Expand All @@ -13,6 +13,7 @@ <h1 class="bar">All&nbsp;Classes</h1>
<div class="indexContainer">
<ul>
<li><a href="picocli/AutoComplete.html" title="class in picocli" target="classFrame">AutoComplete</a></li>
<li><a href="picocli/AutoComplete.GenerateCompletion.html" title="class in picocli" target="classFrame">AutoComplete.GenerateCompletion</a></li>
<li><a href="picocli/CommandLine.html" title="class in picocli" target="classFrame">CommandLine</a></li>
<li><a href="picocli/CommandLine.AbstractHandler.html" title="class in picocli" target="classFrame">CommandLine.AbstractHandler</a></li>
<li><a href="picocli/CommandLine.AbstractParseResultHandler.html" title="class in picocli" target="classFrame">CommandLine.AbstractParseResultHandler</a></li>
Expand Down Expand Up @@ -95,6 +96,7 @@ <h1 class="bar">All&nbsp;Classes</h1>
<li><a href="picocli/CommandLine.ParseResult.GroupMatch.html" title="class in picocli" target="classFrame">CommandLine.ParseResult.GroupMatch</a></li>
<li><a href="picocli/CommandLine.ParseResult.GroupMatchContainer.html" title="class in picocli" target="classFrame">CommandLine.ParseResult.GroupMatchContainer</a></li>
<li><a href="picocli/CommandLine.PicocliException.html" title="class in picocli" target="classFrame">CommandLine.PicocliException</a></li>
<li><a href="picocli/CommandLine.PropertiesDefaultProvider.html" title="class in picocli" target="classFrame">CommandLine.PropertiesDefaultProvider</a></li>
<li><a href="picocli/CommandLine.Range.html" title="class in picocli" target="classFrame">CommandLine.Range</a></li>
<li><a href="picocli/CommandLine.RegexTransformer.html" title="class in picocli" target="classFrame">CommandLine.RegexTransformer</a></li>
<li><a href="picocli/CommandLine.RegexTransformer.Builder.html" title="class in picocli" target="classFrame">CommandLine.RegexTransformer.Builder</a></li>
Expand Down
8 changes: 5 additions & 3 deletions docs/apidocs/allclasses-noframe.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (1.8.0_202) on Mon Sep 09 06:52:51 JST 2019 -->
<title>All Classes (picocli 4.0.4 API)</title>
<meta name="date" content="2019-09-09">
<!-- Generated by javadoc (1.8.0_202) on Fri Nov 22 18:38:44 JST 2019 -->
<title>All Classes (picocli 4.1.0 API)</title>
<meta name="date" content="2019-11-22">
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
<script type="text/javascript" src="script.js"></script>
</head>
Expand All @@ -13,6 +13,7 @@ <h1 class="bar">All&nbsp;Classes</h1>
<div class="indexContainer">
<ul>
<li><a href="picocli/AutoComplete.html" title="class in picocli">AutoComplete</a></li>
<li><a href="picocli/AutoComplete.GenerateCompletion.html" title="class in picocli">AutoComplete.GenerateCompletion</a></li>
<li><a href="picocli/CommandLine.html" title="class in picocli">CommandLine</a></li>
<li><a href="picocli/CommandLine.AbstractHandler.html" title="class in picocli">CommandLine.AbstractHandler</a></li>
<li><a href="picocli/CommandLine.AbstractParseResultHandler.html" title="class in picocli">CommandLine.AbstractParseResultHandler</a></li>
Expand Down Expand Up @@ -95,6 +96,7 @@ <h1 class="bar">All&nbsp;Classes</h1>
<li><a href="picocli/CommandLine.ParseResult.GroupMatch.html" title="class in picocli">CommandLine.ParseResult.GroupMatch</a></li>
<li><a href="picocli/CommandLine.ParseResult.GroupMatchContainer.html" title="class in picocli">CommandLine.ParseResult.GroupMatchContainer</a></li>
<li><a href="picocli/CommandLine.PicocliException.html" title="class in picocli">CommandLine.PicocliException</a></li>
<li><a href="picocli/CommandLine.PropertiesDefaultProvider.html" title="class in picocli">CommandLine.PropertiesDefaultProvider</a></li>
<li><a href="picocli/CommandLine.Range.html" title="class in picocli">CommandLine.Range</a></li>
<li><a href="picocli/CommandLine.RegexTransformer.html" title="class in picocli">CommandLine.RegexTransformer</a></li>
<li><a href="picocli/CommandLine.RegexTransformer.Builder.html" title="class in picocli">CommandLine.RegexTransformer.Builder</a></li>
Expand Down
10 changes: 5 additions & 5 deletions docs/apidocs/constant-values.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (1.8.0_202) on Mon Sep 09 06:52:51 JST 2019 -->
<title>Constant Field Values (picocli 4.0.4 API)</title>
<meta name="date" content="2019-09-09">
<!-- Generated by javadoc (1.8.0_202) on Fri Nov 22 18:38:44 JST 2019 -->
<title>Constant Field Values (picocli 4.1.0 API)</title>
<meta name="date" content="2019-11-22">
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
<script type="text/javascript" src="script.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="Constant Field Values (picocli 4.0.4 API)";
parent.document.title="Constant Field Values (picocli 4.1.0 API)";
}
}
catch(err) {
Expand Down Expand Up @@ -141,7 +141,7 @@ <h2 title="picocli">picocli.*</h2>
<!-- -->
</a><code>public&nbsp;static&nbsp;final&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td><code><a href="picocli/CommandLine.html#VERSION">VERSION</a></code></td>
<td class="colLast"><code>"4.0.4"</code></td>
<td class="colLast"><code>"4.1.0"</code></td>
</tr>
</tbody>
</table>
Expand Down
8 changes: 4 additions & 4 deletions docs/apidocs/deprecated-list.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (1.8.0_202) on Mon Sep 09 06:52:51 JST 2019 -->
<title>Deprecated List (picocli 4.0.4 API)</title>
<meta name="date" content="2019-09-09">
<!-- Generated by javadoc (1.8.0_202) on Fri Nov 22 18:38:44 JST 2019 -->
<title>Deprecated List (picocli 4.1.0 API)</title>
<meta name="date" content="2019-11-22">
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
<script type="text/javascript" src="script.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="Deprecated List (picocli 4.0.4 API)";
parent.document.title="Deprecated List (picocli 4.1.0 API)";
}
}
catch(err) {
Expand Down
8 changes: 4 additions & 4 deletions docs/apidocs/help-doc.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (1.8.0_202) on Mon Sep 09 06:52:51 JST 2019 -->
<title>API Help (picocli 4.0.4 API)</title>
<meta name="date" content="2019-09-09">
<!-- Generated by javadoc (1.8.0_202) on Fri Nov 22 18:38:44 JST 2019 -->
<title>API Help (picocli 4.1.0 API)</title>
<meta name="date" content="2019-11-22">
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
<script type="text/javascript" src="script.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="API Help (picocli 4.0.4 API)";
parent.document.title="API Help (picocli 4.1.0 API)";
}
}
catch(err) {
Expand Down
Loading

0 comments on commit 6389c43

Please sign in to comment.