Example usage for org.apache.maven.execution DefaultMavenExecutionRequest setProjectBuildingConfiguration

List of usage examples for org.apache.maven.execution DefaultMavenExecutionRequest setProjectBuildingConfiguration

Introduction

In this page you can find the example usage for org.apache.maven.execution DefaultMavenExecutionRequest setProjectBuildingConfiguration.

Prototype

public void setProjectBuildingConfiguration(ProjectBuildingRequest projectBuildingConfiguration) 

Source Link

Usage

From source file:org.sourcepit.maven.bootstrap.core.AbstractBootstrapper.java

License:Apache License

private MavenSession createBootSession(MavenSession actualSession) {
    final DefaultRepositorySystemSession repositorySession = new DefaultRepositorySystemSession(
            actualSession.getRepositorySession());
    final DefaultMavenExecutionRequest executionRequest = (DefaultMavenExecutionRequest) DefaultMavenExecutionRequest
            .copy(actualSession.getRequest());
    // fix: copy ignores start time...
    executionRequest.setStartTime(actualSession.getRequest().getStartTime());
    // fix: copy ignores project building request...
    executionRequest.setProjectBuildingConfiguration(
            new DefaultProjectBuildingRequest(actualSession.getRequest().getProjectBuildingRequest()));
    final DefaultMavenExecutionResult executionResult = new DefaultMavenExecutionResult();
    return new MavenSession(plexusContainer, repositorySession, executionRequest, executionResult);
}