From 057f1e8324c0a6aae7c194e0ff30e5560a6995fb Mon Sep 17 00:00:00 2001 From: Benjamin Bentmann Date: Tue, 2 Jun 2009 20:17:54 +0000 Subject: [PATCH] o Gave each model diddling component access to the building request to easy future extensions git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@781147 13f79535-47bb-0310-9956-ffa450edef68 --- .../maven/project/validation/DefaultModelValidator.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/maven-compat/src/main/java/org/apache/maven/project/validation/DefaultModelValidator.java b/maven-compat/src/main/java/org/apache/maven/project/validation/DefaultModelValidator.java index 571d9f4a8a..f231874ca2 100644 --- a/maven-compat/src/main/java/org/apache/maven/project/validation/DefaultModelValidator.java +++ b/maven-compat/src/main/java/org/apache/maven/project/validation/DefaultModelValidator.java @@ -19,7 +19,9 @@ package org.apache.maven.project.validation; * under the License. */ +import org.apache.maven.model.DefaultModelBuildingRequest; import org.apache.maven.model.Model; +import org.apache.maven.model.ModelBuildingRequest; import org.codehaus.plexus.component.annotations.Component; import org.codehaus.plexus.component.annotations.Requirement; @@ -40,7 +42,9 @@ public class DefaultModelValidator { ModelValidationResult result = new ModelValidationResult(); - for ( String message : modelValidator.validateEffectiveModel( model, false ).getMessages() ) + ModelBuildingRequest request = new DefaultModelBuildingRequest().setLenientValidation( false ); + + for ( String message : modelValidator.validateEffectiveModel( model, request ).getMessages() ) { result.addMessage( message ); }