public void registerNewVersions(String artifactId, DeployedJar deployedJar)
      throws ClassNotFoundException {
    lock.lock();
    try {
      if (deployedJar != null) {
        logger.info("Registering new version of jar: {}", deployedJar);
        DeployedJar oldJar = deployedJars.put(artifactId, deployedJar);
        ClassPathLoader.getLatest().chainClassloader(deployedJar.getFile());
      }
    } finally {
      lock.unlock();
    }
  }
Re-deploy all previously deployed JAR files on disk.
It will clean up the old version of deployed jars that are in the deployed directory
geode-deployment/geode-deployment-legacy/src/main/java/org/apache/geode/deployment/internal/JarDeployer.java