@NotNull
  private Collection<Maven3ExecutionResult> doResolveProject() {
    Set<File> files = myPomHashMap.keySet();
    File file = !files.isEmpty() ? files.iterator().next() : null;
    files.forEach(f -> MavenServerStatsCollector.fileRead(f));
    MavenExecutionRequest request = myEmbedder.createRequest(file, myActiveProfiles, myInactiveProfiles, userProperties);

    request.setUpdateSnapshots(myUpdateSnapshots);

    Collection<Maven3ExecutionResult> executionResults = new ArrayList<>();
    List<ProjectBuildingResultInfo> buildingResultInfos = new ArrayList<>();

    myEmbedder.executeWithMavenSession(request, () -> {
      try {
        MavenSession mavenSession = myEmbedder.getComponent(LegacySupport.class).getSession();
        RepositorySystemSession repositorySession = myEmbedder.getComponent(LegacySupport.class).getRepositorySession();
        if (repositorySession instanceof DefaultRepositorySystemSession) {
          DefaultRepositorySystemSession session = (DefaultRepositorySystemSession)repositorySession;
          MavenServerConsoleIndicatorImpl indicator = myLongRunningTask.getIndicator();
          myImporterSpy.setIndicator(indicator);
          session.setTransferListener(new Maven3TransferListenerAdapter(indicator));

          setupWorkspaceReader(session);

          session.setConfigProperty(ConflictResolver.CONFIG_PROP_VERBOSE, true);
          session.setConfigProperty(DependencyManagerUtils.CONFIG_PROP_VERBOSE, true);
        }

        List<ProjectBuildingResult> buildingResults = myTelemetry.callWithSpan("getProjectBuildingResults " + files.size(), () ->
          getProjectBuildingResults(request, files));

        fillSessionCache(mavenSession, repositorySession, buildingResults);

        boolean addUnresolved = System.getProperty("idea.maven.no.use.dependency.graph") == null;

        boolean runInParallel = myResolveInParallel;
        Map<File, String> fileToNewDependencyHash = new ConcurrentHashMap<>();
        myTelemetry.callWithSpan("dependencyHashes", () ->
          myTelemetry.execute(
            runInParallel,
            buildingResults, br -> {
              String newDependencyHash = Maven3EffectivePomDumper.dependencyHash(br.getProject());
              if (null != newDependencyHash) {
                File pomFile = br.getPomFile();
                if (pomFile != null) {
                  fileToNewDependencyHash.put(pomFile, newDependencyHash);
                }
              }
              return br;
            }
          ));

        for (ProjectBuildingResult buildingResult : buildingResults) {
          MavenProject project = buildingResult.getProject();
          if (project == null) {
            new Exception("PROJECT is null").printStackTrace();
          }
          File pomFile = buildingResult.getPomFile();

          String newDependencyHash = null;
          if (pomFile != null) {
            if (project == null) {
              executionResults.add(new Maven3ExecutionResult(pomFile, buildingResult.getProblems()));
              continue;
            }

            String previousDependencyHash = myPomHashMap.getDependencyHash(pomFile);
            newDependencyHash = fileToNewDependencyHash.get(pomFile);
            if (null != previousDependencyHash && previousDependencyHash.equals(newDependencyHash)) {
              Maven3ExecutionResult res = new Maven3ExecutionResult(project, null, new ArrayList<>(), new ArrayList<>());
              res.setDependencyHash(previousDependencyHash);
              res.setDependencyResolutionSkipped(true);
              executionResults.add(res);
              continue;
            }
          }


          List<Exception> exceptions = new ArrayList<>();

          loadExtensions(project, exceptions);

          project.setDependencyArtifacts(project.createArtifacts(myEmbedder.getComponent(ArtifactFactory.class), null, null));

          buildingResultInfos.add(new ProjectBuildingResultInfo(buildingResult, exceptions, newDependencyHash));
        }

        myLongRunningTask.updateTotalRequests(buildingResultInfos.size());
        Collection<Maven3ExecutionResult> execResults =
          myTelemetry.callWithSpan("resolveBuildingResults", () ->
            myTelemetry.execute(
              runInParallel,
              buildingResultInfos, br -> {
                if (myLongRunningTask.isCanceled()) return new Maven3ExecutionResult(Collections.emptyList());
                Maven3ExecutionResult result = myTelemetry.callWithSpan(
                  "resolveBuildingResult " + br.buildingResult.getProjectId(), () ->
                    resolveBuildingResult(repositorySession, addUnresolved, br.buildingResult, br.exceptions));
                result.setDependencyHash(br.dependencyHash);
                myLongRunningTask.incrementFinishedRequests();
                return result;
              }
            ));

        executionResults.addAll(execResults);
      }
      catch (Exception e) {
        executionResults.add(handleException(e));
      }
    });

    return executionResults;
  }
@NotNull
  private Collection<Maven3ExecutionResult> doResolveProject()