Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
package org.apache.maven.api.services.model;

import org.apache.maven.api.model.Model;
import org.apache.maven.api.services.ModelBuilderRequest;
import org.apache.maven.api.services.ModelProblemCollector;

/**
Expand Down Expand Up @@ -60,35 +59,27 @@ public interface ModelValidator {
*
* @param model The model to validate, must not be {@code null}.
* @param validationLevel The validation level.
* @param request The model building request that holds further settings, must not be {@code null}.
* @param problems The container used to collect problems that were encountered, must not be {@code null}.
*/
default void validateFileModel(
Model model, int validationLevel, ModelBuilderRequest request, ModelProblemCollector problems) {
// do nothing
}
void validateFileModel(Model model, int validationLevel, 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.
*
* @param model The model to validate, must not be {@code null}.
* @param validationLevel The validation level.
* @param request The model building request that holds further settings, must not be {@code null}.
* @param problems The container used to collect problems that were encountered, must not be {@code null}.
*/
void validateRawModel(
Model model, int validationLevel, ModelBuilderRequest request, ModelProblemCollector problems);
void validateRawModel(Model model, int validationLevel, 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.
*
* @param model The model to validate, must not be {@code null}.
* @param validationLevel The validation level.
* @param request The model building request that holds further settings, must not be {@code null}.
* @param problems The container used to collect problems that were encountered, must not be {@code null}.
*/
void validateEffectiveModel(
Model model, int validationLevel, ModelBuilderRequest request, ModelProblemCollector problems);
void validateEffectiveModel(Model model, int validationLevel, ModelProblemCollector problems);
}
Original file line number Diff line number Diff line change
Expand Up @@ -858,7 +858,6 @@ void buildEffectiveModel(Collection<String> importIds) throws ModelBuilderExcept
modelValidator.validateEffectiveModel(
resultModel,
isBuildRequest() ? ModelValidator.VALIDATION_LEVEL_STRICT : ModelValidator.VALIDATION_LEVEL_MINIMAL,
request,
this);

if (hasErrors()) {
Expand Down Expand Up @@ -1453,7 +1452,6 @@ Model doReadFileModel() throws ModelBuilderException {
modelValidator.validateFileModel(
model,
isBuildRequest() ? ModelValidator.VALIDATION_LEVEL_STRICT : ModelValidator.VALIDATION_LEVEL_MINIMAL,
request,
this);
if (hasFatalErrors()) {
throw newModelBuilderException();
Expand Down Expand Up @@ -1485,7 +1483,6 @@ private Model doReadRawModel() throws ModelBuilderException {
modelValidator.validateRawModel(
rawModel,
isBuildRequest() ? ModelValidator.VALIDATION_LEVEL_STRICT : ModelValidator.VALIDATION_LEVEL_MINIMAL,
request,
this);

if (hasFatalErrors()) {
Expand Down

Large diffs are not rendered by default.

Loading
Loading