Class PicocliVersionProvider

java.lang.Object
nl.knaw.dans.lib.util.PicocliVersionProvider
All Implemented Interfaces:
picocli.CommandLine.IVersionProvider

public class PicocliVersionProvider extends Object implements picocli.CommandLine.IVersionProvider
Picocli version provider, that reads the version from the manifest file. Note, that this relies on getVersion being called from the main thread. When running the CLI with mvn exec:java, the version will not be found. In that case the version would not be found anyway, as there is no jar file to read the manifest from.
  • Constructor Details

    • PicocliVersionProvider

      public PicocliVersionProvider()
  • Method Details

    • getVersion

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