Source:
<code>public MavenExecutionResult readMavenProject(File pomFile, ProjectBuildingRequest configuration) throws CoreException { long start = System.currentTimeMillis(); log.debug("Reading Maven project: {}", pomFile.getAbsoluteFile()); MavenExecutionResult result = new DefaultMavenExecutionResult(); try { configuration.setValidationLevel(ModelBuildingRequest.VALIDATION_LEVEL_MINIMAL); ProjectBuildingResult projectBuildingResult = lookup(ProjectBuilder.class).build(pomFile, configuration); result.setProject(projectBuildingResult.getProject()); result.setDependencyResolutionResult(projectBuildingResult.getDependencyResolutionResult()); MavenExecutionRequest executionRequest = createExecutionRequest(); <START> populateDefaults(executionRequest); <END> ((DefaultMavenExecutionRequest) executionRequest).setProjectBuildingConfiguration(configuration); processLifecycleParticipants(projectBuildingResult.getProject(), executionRequest, configuration.getRepositorySession()); } catch(ProjectBuildingException ex) { if(ex.getResults() != null && ex.getResults().size() == 1) { ProjectBuildingResult projectBuildingResult = ex.getResults().get(0); result.setProject(projectBuildingResult.getProject()); result.setDependencyResolutionResult(projectBuildingResult.getDependencyResolutionResult()); } result.addException(ex); } catch(RuntimeException e) { result.addException(e); } finally { log.debug("Read Maven project: in ms", pomFile.getAbsoluteFile(), System.currentTimeMillis() - start); } return result; }</code><technical_language>MavenExecutionRequest executionRequest = createExecutionRequest(); populateDefaults(executionRequest); 2 actions unnecessary in cases lifecycleParticipants defined, is say, of time. move processLifecycleParticipants</technical_language>

Target:
public MavenExecutionResult readMavenProject(File pomFile, ProjectBuildingRequest configuration) throws CoreException { long start = System.currentTimeMillis(); log.debug("Reading Maven project: {}", pomFile.getAbsoluteFile()); MavenExecutionResult result = new DefaultMavenExecutionResult(); try { configuration.setValidationLevel(ModelBuildingRequest.VALIDATION_LEVEL_MINIMAL); ProjectBuildingResult projectBuildingResult = lookup(ProjectBuilder.class).build(pomFile, configuration); result.setProject(projectBuildingResult.getProject()); result.setDependencyResolutionResult(projectBuildingResult.getDependencyResolutionResult()); if (hasLifecycleParticipants(projectBuildingResult.getProject())) { MavenExecutionRequest executionRequest = createExecutionRequest(); populateDefaults(executionRequest); ((DefaultMavenExecutionRequest) executionRequest).setProjectBuildingConfiguration(configuration); processLifecycleParticipants(projectBuildingResult.getProject(), executionRequest, configuration.getRepositorySession()); } } catch(ProjectBuildingException ex) { if(ex.getResults() != null && ex.getResults().size() == 1) { ProjectBuildingResult projectBuildingResult = ex.getResults().get(0); result.setProject(projectBuildingResult.getProject()); result.setDependencyResolutionResult(projectBuildingResult.getDependencyResolutionResult()); } result.addException(ex); } catch(RuntimeException e) { result.addException(e); } finally { log.debug("Read Maven project: in ms", pomFile.getAbsoluteFile(), System.currentTimeMillis() - start); } return result; }