Package org.apache.maven.model.building
Class DefaultModelBuildingResult
java.lang.Object
org.apache.maven.model.building.DefaultModelBuildingResult
- All Implemented Interfaces:
ModelBuildingResult
Collects the output of the model builder.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddModelId(String modelId) Gets the external profiles that were active during model building.getActivePomProfiles(String modelId) Gets the profiles from the specified model that were active during model building.Gets the assembled model.Gets the sequence of model identifiers that denote the lineage of models from which the effective model was constructed.Gets the problems that were encountered during the model building.Gets the raw model as it was read from the input model source.getRawModel(String modelId) Gets the specified raw model as it was read from a model source.setActiveExternalProfiles(List<Profile> activeProfiles) setActivePomProfiles(String modelId, List<Profile> activeProfiles) setEffectiveModel(Model model) setProblems(List<ModelProblem> problems) setRawModel(String modelId, Model rawModel)
-
Field Details
-
effectiveModel
-
modelIds
-
rawModels
-
activePomProfiles
-
activeExternalProfiles
-
problems
-
-
Constructor Details
-
DefaultModelBuildingResult
DefaultModelBuildingResult()
-
-
Method Details
-
getEffectiveModel
Description copied from interface:ModelBuildingResultGets the assembled model.- Specified by:
getEffectiveModelin interfaceModelBuildingResult- Returns:
- The assembled model, never
null.
-
setEffectiveModel
-
getModelIds
Description copied from interface:ModelBuildingResultGets the sequence of model identifiers that denote the lineage of models from which the effective model was constructed. Model identifiers have the form<groupId>:<artifactId>:<version>. The first identifier from the list denotes the model on which the model builder was originally invoked. The last identifier will always be an empty string that by definition denotes the super POM.- Specified by:
getModelIdsin interfaceModelBuildingResult- Returns:
- The model identifiers from the lineage of models, never
null.
-
addModelId
-
getRawModel
Description copied from interface:ModelBuildingResultGets the raw model as it was read from the input model source. Apart from basic validation, the raw model has not undergone any updates by the model builder, e.g. reflects neither inheritance nor interpolation.- Specified by:
getRawModelin interfaceModelBuildingResult- Returns:
- The raw model, never
null.
-
getRawModel
Description copied from interface:ModelBuildingResultGets the specified raw model as it was read from a model source. Apart from basic validation, a raw model has not undergone any updates by the model builder, e.g. reflects neither inheritance nor interpolation. The model identifier should be from the collection obtained byModelBuildingResult.getModelIds(). As a special case, an empty string can be used as the identifier for the super POM.- Specified by:
getRawModelin interfaceModelBuildingResult- Parameters:
modelId- The identifier of the desired raw model, must not benull.- Returns:
- The raw model or
nullif the specified model id does not refer to a known model.
-
setRawModel
-
getActivePomProfiles
Description copied from interface:ModelBuildingResultGets the profiles from the specified model that were active during model building. The model identifier should be from the collection obtained byModelBuildingResult.getModelIds(). As a special case, an empty string can be used as the identifier for the super POM.- Specified by:
getActivePomProfilesin interfaceModelBuildingResult- Parameters:
modelId- The identifier of the model whose active profiles should be retrieved, must not benull.- Returns:
- The active profiles of the model or an empty list if none or
nullif the specified model id does not refer to a known model.
-
setActivePomProfiles
public DefaultModelBuildingResult setActivePomProfiles(String modelId, List<Profile> activeProfiles) -
getActiveExternalProfiles
Description copied from interface:ModelBuildingResultGets the external profiles that were active during model building. External profiles are those that were contributed byModelBuildingRequest.getProfiles().- Specified by:
getActiveExternalProfilesin interfaceModelBuildingResult- Returns:
- The active external profiles or an empty list if none, never
null.
-
setActiveExternalProfiles
-
getProblems
Description copied from interface:ModelBuildingResultGets the problems that were encountered during the model building. Note that only problems of severityModelProblem.Severity.WARNINGand below are reported here. Problems with a higher severity level cause the model builder to fail with aModelBuildingException.- Specified by:
getProblemsin interfaceModelBuildingResult- Returns:
- The problems that were encountered during the model building, can be empty but never
null.
-
setProblems
-