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:
- java.io.Serializable
public class ModelBuildingException
- extends java.lang.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.
- Author:
- Benjamin Bentmann
- See Also:
- Serialized Form
|
Method Summary |
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. |
| Methods inherited from class java.lang.Throwable |
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
ModelBuildingException
public ModelBuildingException(java.lang.String modelId,
java.util.List<ModelProblem> problems)
- Creates a new exception with the specified problems.
- Parameters:
modelId - The identifier of the model that could not be built, may be null.problems - The problems that causes this exception, may be null.
getModelId
public java.lang.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.
- Returns:
- The identifier of the POM or an empty string if not known, never
null.
getProblems
public java.util.List<ModelProblem> getProblems()
- Gets the problems that caused this exception.
- Returns:
- The problems that caused this exception, never
null.
Copyright © 2001-2010 The Apache Software Foundation. All Rights Reserved.