public static Map<MavenProject, Integer> buildProjectTree(MavenProjectsManager manager) {
    Map<MavenProject, Integer> res = new LinkedHashMap<>();

    doBuildProjectTree(manager, res, manager.getRootProjects(), 0);

    return res;
  }
public static Map<MavenProject, Integer> buildProjectTree(MavenProjectsManager manager)