private boolean shouldDeployNewVersion(String artifactId, File stagedJar) throws IOException {
    DeployedJar oldDeployedJar = deployedJars.get(artifactId);

    if (oldDeployedJar == null) {
      return true;
    }

    if (oldDeployedJar.hasSameContentAs(stagedJar)) {
      logger.warn("Jar is identical to the latest deployed version: {}",
          oldDeployedJar.getFileCanonicalPath());

      return false;
    }

    return true;
  }
Deploy the given JAR files.

When deploying a jar file, it will always append a sequence number .v<digit> to the end of
the file, no matter how the original file is named. This is to allow server on startup to
know what's the last version that gets deployed without cluster configuration.

@param stagedJarFile A File which have been staged in another location and is ready
       to be deployed.
@return An array of newly created JAR class loaders. Entries will be null for an JARs that were
        already deployed.
@throws IOException When there's an error saving the JAR file to disk
geode-deployment/geode-deployment-legacy/src/main/java/org/apache/geode/deployment/internal/JarDeployer.java