Package org.apache.maven.model.building
Class ModelProblemUtils
- java.lang.Object
-
- org.apache.maven.model.building.ModelProblemUtils
-
public class ModelProblemUtils extends Object
Assists in the handling of model problems.- Author:
- Benjamin Bentmann
-
-
Constructor Summary
Constructors Constructor Description ModelProblemUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static String
formatLocation(ModelProblem problem, String projectId)
Creates a string with all location details for the specified model problem.
-
-
-
Method Detail
-
formatLocation
public static String formatLocation(ModelProblem problem, String projectId)
Creates a string with all location details for the specified model problem. If the project identifier is provided, the generated location will omit the model id and source information and only give line/column information for problems originating directly from this POM.- Parameters:
problem
- The problem whose location should be formatted, must not benull
.projectId
- The<groupId>:<artifactId>:<version>
of the corresponding project, may benull
to force output of model id and source.- Returns:
- The formatted problem location or an empty string if unknown, never
null
.
-
-