protected void downloadRemoteIndex(MavenServerProgressIndicator indicator, IndexingContext context)
    throws Throwable {

    Future<?> future = myRemoteExecutorService.submit(() -> {
      try {
        Wagon httpWagon = myContainer.lookup(Wagon.class, "http");
        ResourceFetcher resourceFetcher = new WagonHelper.WagonFetcher(httpWagon, new WagonTransferListenerAdapter(indicator),
                                                                       null, null);
        Date currentTimestamp = context.getTimestamp();
        IndexUpdateRequest request = new IndexUpdateRequest(context, resourceFetcher);
        indicator.setText("Updating index for " + context.getRepositoryUrl());
        IndexUpdateResult updateResult = myUpdater.fetchAndUpdateIndex(request);
        updateIndicatorStatus(indicator, context, updateResult, currentTimestamp);
      }
      catch (Exception e) {
        throw new RuntimeException(e);
      }
    });

    while (!indicator.isCanceled()) {
      try {
        future.get(100, TimeUnit.MILLISECONDS);
        return;
      }
      catch (TimeoutException ignore) {
      }
      catch (InterruptedException e) {
        Thread.currentThread().interrupt();
        throw new RuntimeException("Maven indexing was terminated");
      }
      catch (ExecutionException e) {
        throw e.getCause();
      }
    }
  }
protected void downloadRemoteIndex(MavenServerProgressIndicator indicator, IndexingContext context)