code: private String getVersion(boolean verbose) {
          try {
              InputStream stream = getClass().getResourceAsStream("/version.properties");
              Properties props = new Properties();
              props.load(stream);
              if (verbose) {
                  return String.format("Version=%s, build date=%s",
                          props.getProperty("version"),
                          props.getProperty("buildDate"));
              } else {
                  return props.getProperty("version");
              }
          } catch (IOException e) {
              log.error("Unable to retrieve version", e);
              return "unknown";
          }
      }
docs: Retrieve the current version.
  
  @parm verbose when true will also return the build date
  @return the version number and build date