use of org.apache.maven.model.building.ModelProblemCollectorRequest in project spring-cloud-function by spring-cloud.
the class MavenSettings method createFailureMessage.
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(), " "));
}
}
return message.toString();
}
use of org.apache.maven.model.building.ModelProblemCollectorRequest in project sts4 by spring-projects.
the class MavenBridge method interpolateModel.
public void interpolateModel(MavenProject project, Model model) throws MavenException {
ModelBuildingRequest request = new DefaultModelBuildingRequest();
request.setUserProperties(project.getProperties());
ModelProblemCollector problems = new ModelProblemCollector() {
@Override
public void add(ModelProblemCollectorRequest req) {
}
};
lookup(ModelInterpolator.class).interpolateModel(model, project.getBasedir(), request, problems);
}
use of org.apache.maven.model.building.ModelProblemCollectorRequest in project spring-boot by spring-projects.
the class MavenSettings method createFailureMessage.
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()) {
String location = (problem.getLocation() != null) ? " at " + problem.getLocation() : "";
printer.println(" " + problem.getMessage() + location);
if (problem.getException() != null) {
printer.println(indentStackTrace(problem.getException(), " "));
}
}
return message.toString();
}
Aggregations