Class ModelBuildingException

All Implemented Interfaces:

public class ModelBuildingException extends Exception
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 Details

    • ModelBuildingException

      @Deprecated public ModelBuildingException(Model model, String modelId, List<ModelProblem> problems)
      Creates a new exception with the specified problems.
      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 cause this exception, may be null.
    • ModelBuildingException

      public ModelBuildingException(ModelBuildingResult result)
      Creates a new exception from the specified interim result and its associated problems.
      result - The interim result, may be null.
  • Method Details

    • getResult

      public ModelBuildingResult getResult()
      Gets the interim result of the model building up to the point where it failed.
      The interim model building result or null if not available.
    • getModel

      public Model getModel()
      Gets the model that could not be built properly.
      The erroneous model or null if not available.
    • getModelId

      public String getModelId()
      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.
      The identifier of the POM or an empty string if not known, never null.
    • getProblems

      public List<ModelProblem> getProblems()
      Gets the problems that caused this exception.
      The problems that caused this exception, never null.