Show validation error message in debug mode

git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@329821 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Emmanuel Venisse 2005-10-31 14:20:38 +00:00
parent eca668eec3
commit 6a40b74bca
1 changed files with 15 additions and 0 deletions

View File

@ -41,6 +41,7 @@ import org.apache.maven.project.InvalidProjectModelException;
import org.apache.maven.project.MavenProject;
import org.apache.maven.project.MavenProjectBuilder;
import org.apache.maven.project.ProjectBuildingException;
import org.apache.maven.project.validation.ModelValidationResult;
import org.codehaus.plexus.logging.AbstractLogEnabled;
import org.codehaus.plexus.util.StringUtils;
@ -107,6 +108,20 @@ public class MavenMetadataSource
"\' does not appear to be valid. Its will be ignored for artifact resolution.\n\nReason: " +
e.getMessage() + "\n\n" );
if ( getLogger().isDebugEnabled() )
{
ModelValidationResult validationResult = e.getValidationResult();
if ( validationResult != null )
{
for ( Iterator i = validationResult.getMessages().iterator(); i.hasNext(); )
{
getLogger().debug( i.next().toString() );
}
getLogger().debug( "\n\n" );
}
}
project = null;
}
catch ( ProjectBuildingException e )