@Nullable
  private static MavenPluginInfo createPluginDocument(Path file) {
    try {
      if (!Files.exists(file)) return null;

      try (ZipFile jar = new ZipFile(file.toFile())) {
        ZipEntry entry = jar.getEntry(MAVEN_PLUGIN_DESCRIPTOR);

        if (entry == null) {
          MavenLog.LOG.info(IndicesBundle.message("repository.plugin.corrupt", file));
          return null;
        }

        try (InputStream is = jar.getInputStream(entry)) {
          byte[] bytes = FileUtil.loadBytes(is);
          return new MavenPluginInfo(bytes);
        }
      }
    }
    catch (IOException e) {
      MavenLog.LOG.info(e);
      return null;
    }
  }
@Nullable
  private static MavenPluginInfo createPluginDocument(Path file)