Search in sources :

Example 1 with MavenExecutionRequestPopulationException

use of org.apache.maven.execution.MavenExecutionRequestPopulationException in project che by eclipse.

the class MavenServerImpl method newMavenRequest.

public MavenExecutionRequest newMavenRequest(File pom, List<String> activeProfiles, List<String> inactiveProfiles, List<String> goals) {
    MavenExecutionRequest request = new DefaultMavenExecutionRequest();
    try {
        getMavenComponent(MavenExecutionRequestPopulator.class).populateFromSettings(request, settings);
        request.setGoals(goals);
        request.setPom(pom);
        getMavenComponent(MavenExecutionRequestPopulator.class).populateDefaults(request);
        request.setSystemProperties(properties);
        request.setActiveProfiles(activeProfiles);
        request.setInactiveProfiles(inactiveProfiles);
        request.setStartTime(buildDate);
        return request;
    } catch (MavenExecutionRequestPopulationException e) {
        throw new RuntimeException(e);
    }
}
Also used : MavenExecutionRequestPopulationException(org.apache.maven.execution.MavenExecutionRequestPopulationException) MavenExecutionRequest(org.apache.maven.execution.MavenExecutionRequest) DefaultMavenExecutionRequest(org.apache.maven.execution.DefaultMavenExecutionRequest) DefaultMavenExecutionRequest(org.apache.maven.execution.DefaultMavenExecutionRequest) MavenExecutionRequestPopulator(org.apache.maven.execution.MavenExecutionRequestPopulator)

Aggregations

DefaultMavenExecutionRequest (org.apache.maven.execution.DefaultMavenExecutionRequest)1 MavenExecutionRequest (org.apache.maven.execution.MavenExecutionRequest)1 MavenExecutionRequestPopulationException (org.apache.maven.execution.MavenExecutionRequestPopulationException)1 MavenExecutionRequestPopulator (org.apache.maven.execution.MavenExecutionRequestPopulator)1