maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From eveni...@apache.org
Subject svn commit: r329821 - /maven/components/trunk/maven-project/src/main/java/org/apache/maven/project/artifact/MavenMetadataSource.java
Date Mon, 31 Oct 2005 14:20:43 GMT
Author: evenisse
Date: Mon Oct 31 06:20:38 2005
New Revision: 329821

URL: http://svn.apache.org/viewcvs?rev=329821&view=rev
Log:
Show validation error message in debug mode

Modified:
    maven/components/trunk/maven-project/src/main/java/org/apache/maven/project/artifact/MavenMetadataSource.java

Modified: maven/components/trunk/maven-project/src/main/java/org/apache/maven/project/artifact/MavenMetadataSource.java
URL: http://svn.apache.org/viewcvs/maven/components/trunk/maven-project/src/main/java/org/apache/maven/project/artifact/MavenMetadataSource.java?rev=329821&r1=329820&r2=329821&view=diff
==============================================================================
--- maven/components/trunk/maven-project/src/main/java/org/apache/maven/project/artifact/MavenMetadataSource.java
(original)
+++ maven/components/trunk/maven-project/src/main/java/org/apache/maven/project/artifact/MavenMetadataSource.java
Mon Oct 31 06:20:38 2005
@@ -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;
 
@@ -106,6 +107,20 @@
                     getLogger().warn( "POM for: \'" + pomArtifact +
                         "\' 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;
                 }



Mime
View raw message