mirror of
https://github.com/apache/maven.git
synced 2025-02-28 21:59:13 +00:00
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:
parent
eca668eec3
commit
6a40b74bca
@ -41,6 +41,7 @@
|
||||
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 ResolutionGroup retrieve( Artifact artifact, ArtifactRepository localRepo
|
||||
"\' 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 )
|
||||
|
Loading…
x
Reference in New Issue
Block a user