Interface ModelValidator
- All Known Implementing Classes:
DefaultModelValidator
public interface ModelValidator
Checks the model for missing or invalid values.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
Denotes validation as performed by Maven 2.0.static final int
Denotes validation as performed by Maven 3.0.static final int
Denotes validation as performed by Maven 3.1.static final int
Denotes validation as performed by Maven 4.0.static final int
Denotes minimal validation of POMs.static final int
Denotes strict validation as recommended by the current Maven version. -
Method Summary
Modifier and TypeMethodDescriptionvoid
validateEffectiveModel
(Model model, int validationLevel, ModelBuilderRequest request, ModelProblemCollector problems) Checks the specified (effective) model for missing or invalid values.default void
validateFileModel
(Model model, int validationLevel, ModelBuilderRequest request, ModelProblemCollector problems) Checks the specified file model for missing or invalid values.void
validateRawModel
(Model model, int validationLevel, ModelBuilderRequest request, ModelProblemCollector problems) Checks the specified (raw) model for missing or invalid values.
-
Field Details
-
VALIDATION_LEVEL_MINIMAL
static final int VALIDATION_LEVEL_MINIMALDenotes minimal validation of POMs. This validation level is meant for processing of POMs from repositories during metadata retrieval.- See Also:
-
VALIDATION_LEVEL_MAVEN_2_0
static final int VALIDATION_LEVEL_MAVEN_2_0Denotes validation as performed by Maven 2.0. This validation level is meant as a compatibility mode to allow users to migrate their projects.- See Also:
-
VALIDATION_LEVEL_MAVEN_3_0
static final int VALIDATION_LEVEL_MAVEN_3_0Denotes validation as performed by Maven 3.0. This validation level is meant for existing projects.- See Also:
-
VALIDATION_LEVEL_MAVEN_3_1
static final int VALIDATION_LEVEL_MAVEN_3_1Denotes validation as performed by Maven 3.1. This validation level is meant for existing projects.- See Also:
-
VALIDATION_LEVEL_MAVEN_4_0
static final int VALIDATION_LEVEL_MAVEN_4_0Denotes validation as performed by Maven 4.0. This validation level is meant for new projects.- See Also:
-
VALIDATION_LEVEL_STRICT
static final int VALIDATION_LEVEL_STRICTDenotes strict validation as recommended by the current Maven version.- See Also:
-
-
Method Details
-
validateFileModel
default void validateFileModel(Model model, int validationLevel, ModelBuilderRequest request, ModelProblemCollector problems) Checks the specified file model for missing or invalid values. This model is directly created from the POM file and has not been subjected to inheritance, interpolation or profile/default injection.- Parameters:
model
- The model to validate, must not benull
.validationLevel
- The validation level.request
- The model building request that holds further settings, must not benull
.problems
- The container used to collect problems that were encountered, must not benull
.
-
validateRawModel
void validateRawModel(Model model, int validationLevel, ModelBuilderRequest request, ModelProblemCollector problems) Checks the specified (raw) model for missing or invalid values. The raw model is the file model + buildpom filter transformation and has not been subjected to inheritance, interpolation or profile/default injection.- Parameters:
model
- The model to validate, must not benull
.validationLevel
- The validation level.request
- The model building request that holds further settings, must not benull
.problems
- The container used to collect problems that were encountered, must not benull
.
-
validateEffectiveModel
void validateEffectiveModel(Model model, int validationLevel, ModelBuilderRequest request, ModelProblemCollector problems) Checks the specified (effective) model for missing or invalid values. The effective model is fully assembled and has undergone inheritance, interpolation and other model operations.- Parameters:
model
- The model to validate, must not benull
.validationLevel
- The validation level.request
- The model building request that holds further settings, must not benull
.problems
- The container used to collect problems that were encountered, must not benull
.
-