Example usage for org.apache.maven.model.building ModelProblemCollectorRequest getLocation

List of usage examples for org.apache.maven.model.building ModelProblemCollectorRequest getLocation

Introduction

In this page you can find the example usage for org.apache.maven.model.building ModelProblemCollectorRequest getLocation.

Prototype

public InputLocation getLocation() 

Source Link

Usage

From source file:org.springframework.boot.cli.compiler.maven.MavenSettings.java

License:Apache License

private String createFailureMessage(SpringBootCliModelProblemCollector problemCollector) {
    StringWriter message = new StringWriter();
    PrintWriter printer = new PrintWriter(message);
    printer.println("Failed to determine active profiles:");
    for (ModelProblemCollectorRequest problem : problemCollector.getProblems()) {
        printer.println("    " + problem.getMessage() + " at " + problem.getLocation());
    }/*from  w w w.jav a2s.c  o m*/
    return message.toString();
}

From source file:org.springframework.boot.loader.thin.MavenSettings.java

License:Apache License

private String createFailureMessage(SpringBootCliModelProblemCollector problemCollector) {
    StringWriter message = new StringWriter();
    PrintWriter printer = new PrintWriter(message);
    printer.println("Failed to determine active profiles:");
    for (ModelProblemCollectorRequest problem : problemCollector.getProblems()) {
        printer.println("    " + problem.getMessage()
                + (problem.getLocation() != null ? " at " + problem.getLocation() : ""));
        if (problem.getException() != null) {
            printer.println(indentStackTrace(problem.getException(), "        "));
        }//w w  w.ja  va2 s. co  m
    }
    return message.toString();
}