public class ModelBuildingException
extends java.lang.Exception
getProblems()
to query the
details of the failure.Modifier and Type | Field and Description |
---|---|
private ModelBuildingResult |
result |
Constructor and Description |
---|
ModelBuildingException(ModelBuildingResult result)
Creates a new exception from the specified interim result and its associated problems.
|
ModelBuildingException(Model model,
java.lang.String modelId,
java.util.List<ModelProblem> problems)
Deprecated.
Use
ModelBuildingException(ModelBuildingResult) instead. |
Modifier and Type | Method and Description |
---|---|
Model |
getModel()
Gets the model that could not be built properly.
|
java.lang.String |
getModelId()
Gets the identifier of the POM whose effective model could not be built.
|
java.util.List<ModelProblem> |
getProblems()
Gets the problems that caused this exception.
|
ModelBuildingResult |
getResult()
Gets the interim result of the model building up to the point where it failed.
|
private static java.lang.String |
toMessage(ModelBuildingResult result) |
private static java.lang.String |
toMessage(java.lang.String modelId,
java.util.List<ModelProblem> problems) |
private final ModelBuildingResult result
@Deprecated public ModelBuildingException(Model model, java.lang.String modelId, java.util.List<ModelProblem> problems)
ModelBuildingException(ModelBuildingResult)
instead.model
- The model that could not be built, may be null
.modelId
- The identifier of the model that could not be built, may be null
.problems
- The problems that causes this exception, may be null
.public ModelBuildingException(ModelBuildingResult result)
result
- The interim result, may be null
.public ModelBuildingResult getResult()
null
if not available.public Model getModel()
null
if not available.public java.lang.String getModelId()
<groupId>:<artifactId>:<version>
but some of these coordinates may still be unknown at the point the
exception is thrown so this information is merely meant to assist the user.null
.public java.util.List<ModelProblem> getProblems()
null
.private static java.lang.String toMessage(ModelBuildingResult result)
private static java.lang.String toMessage(java.lang.String modelId, java.util.List<ModelProblem> problems)