Simplify version designations with Picocli in CLI appliations.

Description

BaseCliApplication allows subclass CLI applications to specify version and other metadata, but because of Picocli limitations the subclass needs to specify a separate IVersionProvider implementation in order to indicate the actual class being used, to have the context for configuration file lookup.

In Picocli Issue #629 Picocli added a way to inject the CommandSpec used, which provides access at runtime to the userObject() to which the command is attached. This can provide us with the subclass context we need via the base class code, allowing us to remove the requirement that the subclass do extra work beyond providing the config file.

This should be available in Picocli 4.2.0 and later.

Environment

None

Assignee

Garret Wilson

Reporter

Garret Wilson

Labels

None

Fix versions

Affects versions

Priority

Major
Configure