void (List<ProjectBuildingResult> buildingResults, ProjectBuildingException e) { List<ProjectBuildingResult> results = e.getResults(); if (results != null && !results.isEmpty()) { buildingResults.addAll(results); } else { Throwable cause = e.getCause(); List<ModelProblem> problems = null; if (cause instanceof ModelBuildingException) { problems = ((ModelBuildingException)cause).getProblems(); } buildingResults.add(new MyProjectBuildingResult(null, e.getPomFile(), null, problems, null)); } }