Maven3ExecutionResult (RepositorySystemSession repositorySession, boolean addUnresolved, ProjectBuildingResult buildingResult, List<Exception> exceptions) { MavenProject project = buildingResult.getProject(); try { List<ModelProblem> modelProblems = new ArrayList<>(); if (buildingResult.getProblems() != null) { modelProblems.addAll(buildingResult.getProblems()); } DependencyResolutionResult dependencyResolutionResult = resolveDependencies(project, repositorySession); Set<Artifact> artifacts = resolveArtifacts(dependencyResolutionResult, addUnresolved); project.setArtifacts(artifacts); return new Maven3ExecutionResult(project, dependencyResolutionResult, exceptions, modelProblems); } catch (Exception e) { return handleException(project, e); } }