List<ProjectBuildingResult> (@NotNull MavenExecutionRequest request, @NotNull Collection<File> files) { ProjectBuilder builder = myEmbedder.getComponent(ProjectBuilder.class); List<ProjectBuildingResult> buildingResults = new ArrayList<>(); ProjectBuildingRequest projectBuildingRequest = request.getProjectBuildingRequest(); projectBuildingRequest.setValidationLevel(ModelBuildingRequest.VALIDATION_LEVEL_MINIMAL); projectBuildingRequest.setResolveDependencies(false); if (files.size() == 1) { buildSinglePom(builder, buildingResults, projectBuildingRequest, files.iterator().next()); } else { try { buildingResults = builder.build(new ArrayList<>(files), false, projectBuildingRequest); } catch (ProjectBuildingException e) { for (ProjectBuildingResult result : e.getResults()) { if (result.getProject() != null) { buildingResults.add(result); } else { buildSinglePom(builder, buildingResults, projectBuildingRequest, result.getPomFile()); } } } } return buildingResults; }