private void doUpdateIndexData(IndexData data, MavenProgressIndicator progress)
    throws IOException, MavenServerIndexerException {

    final Map<String, Set<String>> groupToArtifactMap = new HashMap<>();
    final Map<String, Set<String>> groupWithArtifactToVersionMap = new HashMap<>();
    final Map<String, Set<String>> archetypeIdToDescriptionMap = new HashMap<>();

    progress.pushState();
    progress.setIndeterminate(true);

    try {
      final StringBuilder builder = new StringBuilder();
      MavenIndicesProcessor mavenIndicesProcessor = artifacts -> {
        for (IndexedMavenId id : artifacts) {
          if ("pom.lastUpdated".equals(id.packaging)) {
            continue;
          }
          builder.setLength(0);

          builder.append(id.groupId).append(":").append(id.artifactId);
          String ga = builder.toString();

          getOrCreate(groupToArtifactMap, id.groupId).add(id.artifactId);
          getOrCreate(groupWithArtifactToVersionMap, ga).add(id.version);

          if ("maven-archetype".equals(id.packaging)) {
            builder.setLength(0);
            builder.append(id.version).append(":").append(StringUtil.notNullize(id.description));
            getOrCreate(archetypeIdToDescriptionMap, ga).add(builder.toString());
          }
        }
      };
      myNexusIndexer.processArtifacts(data.mavenIndexId, mavenIndicesProcessor, progress);

      persist(groupToArtifactMap, data.groupToArtifactMap);
      persist(groupWithArtifactToVersionMap, data.groupWithArtifactToVersionMap);
      persist(archetypeIdToDescriptionMap, data.archetypeIdToDescriptionMap);
    }
    finally {
      progress.popState();
    }
  }
private void doUpdateIndexData(IndexData data, MavenProgressIndicator progress)