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

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

Introduction

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

Prototype

@Override
    public MavenExecutionRequest setLoggingLevel(int loggingLevel) 

Source Link

Usage

From source file:org.maven.ide.eclipse.embedder.EmbedderFactory.java

License:Apache License

public static MavenExecutionRequest createMavenExecutionRequest(MavenEmbedder embedder, boolean offline,
        boolean debug) {
    DefaultMavenExecutionRequest request = new DefaultMavenExecutionRequest();

    request.setOffline(offline);/*from  w  w w  . java2s  . c  o  m*/
    request.setUseReactor(false);
    request.setRecursive(true);

    if (debug) {
        request.setShowErrors(true);
        request.setLoggingLevel(MavenExecutionRequest.LOGGING_LEVEL_DEBUG);
    } else {
        request.setShowErrors(false);
        request.setLoggingLevel(MavenExecutionRequest.LOGGING_LEVEL_INFO);
    }

    return request;
}