Class MicronautVersionProvider

java.lang.Object
io.micronaut.starter.cli.util.MicronautVersionProvider
All Implemented Interfaces:
picocli.CommandLine.IVersionProvider

@Singleton public class MicronautVersionProvider extends Object implements picocli.CommandLine.IVersionProvider
Generates version information. Example usage:
 @Command(name = 'command', versionProvider = MicronautCliVersionProvider)
 class App {
     @Option(names = ["-V", "--version"], versionHelp = true, description = 'Display version information and quit.')
     boolean isVersionRequested
 }
 
Or use picocli's built-in standard usage help option (--help and -h) and version help option (-V and --version).
 @Command(name = 'command', mixinStandardHelpOptions = true, versionProvider = MicronautCliVersionProvider)
 class App {
     // ...
 }
 
Author:
Remko Popma
  • Constructor Details

    • MicronautVersionProvider

      public MicronautVersionProvider()
  • Method Details

    • getVersion

      public String[] getVersion()
      Specified by:
      getVersion in interface picocli.CommandLine.IVersionProvider