Package org.apache.maven.model.building
Class ModelBuildingException
java.lang.Object
java.lang.Throwable
java.lang.Exception
org.apache.maven.model.building.ModelBuildingException
- All Implemented Interfaces:
Serializable
Deprecated.
Signals one ore more errors during model building. The model builder tries to collect as many problems as possible
before eventually failing to provide callers with rich error information. Use
getProblems()
to query the
details of the failure.- See Also:
-
Constructor Summary
ConstructorDescriptionDeprecated.Creates a new exception from the specified interim result and its associated problems.ModelBuildingException
(Model model, String modelId, List<ModelProblem> problems) Deprecated.UseModelBuildingException(ModelBuildingResult)
instead. -
Method Summary
Modifier and TypeMethodDescriptiongetModel()
Deprecated.Gets the model that could not be built properly.Deprecated.Gets the identifier of the POM whose effective model could not be built.Deprecated.Gets the problems that caused this exception.Deprecated.Gets the interim result of the model building up to the point where it failed.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
ModelBuildingException
Deprecated.UseModelBuildingException(ModelBuildingResult)
instead.Creates a new exception with the specified problems.- Parameters:
model
- The model that could not be built, may benull
.modelId
- The identifier of the model that could not be built, may benull
.problems
- The problems that cause this exception, may benull
.
-
ModelBuildingException
Deprecated.Creates a new exception from the specified interim result and its associated problems.- Parameters:
result
- The interim result, may benull
.
-
-
Method Details
-
getResult
Deprecated.Gets the interim result of the model building up to the point where it failed.- Returns:
- The interim model building result or
null
if not available.
-
getModel
Deprecated.Gets the model that could not be built properly.- Returns:
- The erroneous model or
null
if not available.
-
getModelId
Deprecated.Gets the identifier of the POM whose effective model could not be built. The general format of the identifier is<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.- Returns:
- The identifier of the POM or an empty string if not known, never
null
.
-
getProblems
Deprecated.Gets the problems that caused this exception.- Returns:
- The problems that caused this exception, never
null
.
-
ModelBuilder
instead