protected int getMaxVersion(String artifactId) {
    return Arrays.stream(deployDirectory.list()).filter(x -> artifactId.equals(
        JarFileUtils.toArtifactId(x)))
        .map(JarFileUtils::extractVersionFromFilename)
        .reduce(Integer::max).orElse(0);
  }
Writes the jarBytes for the given jarName to the next version of that jar file (if the bytes do
not match the latest deployed version).

@return the DeployedJar that was written from jarBytes, or null if those bytes matched the
        latest deployed version
geode-deployment/geode-deployment-legacy/src/main/java/org/apache/geode/deployment/internal/JarDeployer.java