private static VersionMetadata resolveVersionMetadata(final File metadataFile)
      throws IOException {
    VersionMetadata versionMetadata;
    try {
      versionMetadata = MAPPER.readValue(metadataFile, VersionMetadata.class);
      LOG.info("Existing version data detected. Besu version {}", versionMetadata.besuVersion);
    } catch (FileNotFoundException fnfe) {
      versionMetadata = new VersionMetadata(BESU_VERSION_UNKNOWN);
    } catch (JsonProcessingException jpe) {
      throw new IllegalStateException(
          String.format("Invalid metadata file %s", metadataFile.getAbsolutePath()), jpe);
    }
    return versionMetadata;
  }
Get the version of Besu that is running.

@return the version of Besu
ethereum/core/src/main/java/org/hyperledger/besu/ethereum/core/VersionMetadata.java