class DefaultModelValidator implements ModelValidator {

    @Inject
    private org.apache.maven.model.validation.ModelValidator modelValidator;

    public ModelValidationResult validate(Model model) {<FILL_FUNCTION_BODY>}

    private static class SimpleModelProblemCollector implements ModelProblemCollector {

        ModelValidationResult result;

        SimpleModelProblemCollector(ModelValidationResult result) {
            this.result = result;
        }

        public void add(ModelProblemCollectorRequest req) {
            if (!ModelProblem.Severity.WARNING.equals(req.getSeverity())) {
                result.addMessage(req.getMessage());
            }
        }
    }
}

        ModelValidationResult result = new ModelValidationResult();

        ModelBuildingRequest request =
                new DefaultModelBuildingRequest().setValidationLevel(ModelBuildingRequest.VALIDATION_LEVEL_MAVEN_2_0);

        SimpleModelProblemCollector problems = new SimpleModelProblemCollector(result);

        modelValidator.validateEffectiveModel(model, request, problems);

        return result;
    
<no_super_class>