private static File jarModulesOutput(Set<Module> modules, @Nullable Manifest manifest, @Nullable String pluginXmlPath) throws IOException {
    File tempFile = FileUtil.createTempFile(TEMP_PREFIX, JAR_EXTENSION);

    try (Compressor.Jar jar = new Compressor.Jar(tempFile)) {
      FileTypeManager manager = FileTypeManager.getInstance();
      Set<String> uniqueEntries = new HashSet<>();
      jar.filter((entryName, file) -> !manager.isFileIgnored(PathUtil.getFileName(entryName)) && uniqueEntries.add(entryName));

      if (manifest != null) {
        jar.addManifest(manifest);
      }

      for (Module module : modules) {
        CompilerModuleExtension extension = CompilerModuleExtension.getInstance(module);
        if (extension != null) {
          VirtualFile outputPath = extension.getCompilerOutputPath();
          if (outputPath != null) {
            // pre-condition: output dirs for all modules are up-to-date
            jar.addDirectory(outputPath.toNioPath());
          }
        }
      }

      if (pluginXmlPath != null) {
        jar.addFile(PluginDescriptorConstants.PLUGIN_XML_PATH, new File(pluginXmlPath));
      }
    }

    return tempFile;
  }
private static File jarModulesOutput(Set<Module> modules, @Nullable Manifest manifest, @Nullable String pluginXmlPath)