private static void makeAndAddLibraryJar(VirtualFile root,
                                           String pluginName,
                                           Compressor zip,
                                           Set<String> usedJarNames,
                                           @Nullable String preferredName) throws IOException {
    File tempFile = FileUtil.createTempFile(TEMP_PREFIX, JAR_EXTENSION);
    try {
      try (Compressor tempZip = new Compressor.Zip(tempFile)) {
        FileTypeManager manager = FileTypeManager.getInstance();
        tempZip.filter((entryName, file) -> !manager.isFileIgnored(PathUtil.getFileName(entryName)));
        tempZip.addDirectory(VfsUtilCore.virtualToIoFile(root));
      }
      String jarName = getLibraryFileName(root.getName() + JAR_EXTENSION, usedJarNames, preferredName == null ? null : preferredName + JAR_EXTENSION);
      zip.addFile(getZipPath(pluginName, jarName), tempFile);
    }
    finally {
      FileUtil.delete(tempFile);
    }
  }
private static void makeAndAddLibraryJar(VirtualFile root,
                                           String pluginName,
                                           Compressor zip,
                                           Set<String> usedJarNames,
                                           @Nullable String preferredName)