diff --git a/maven-project/src/main/java/org/apache/maven/project/DefaultMavenProjectBuilder.java b/maven-project/src/main/java/org/apache/maven/project/DefaultMavenProjectBuilder.java index 261a141b40..9a3ec9d651 100644 --- a/maven-project/src/main/java/org/apache/maven/project/DefaultMavenProjectBuilder.java +++ b/maven-project/src/main/java/org/apache/maven/project/DefaultMavenProjectBuilder.java @@ -1080,7 +1080,7 @@ public class DefaultMavenProjectBuilder if ( modelSource.indexOf( "4.0.0" ) < 0 ) { - throw new InvalidProjectModelException( projectId, pomLocation, "Invalid POM (not v4.0.0 modelVersion)" ); + throw new InvalidProjectModelException( projectId, pomLocation, "Not a v4.0.0 POM." ); } StringReader sReader = new StringReader( modelSource ); diff --git a/maven-project/src/main/java/org/apache/maven/project/artifact/MavenMetadataSource.java b/maven-project/src/main/java/org/apache/maven/project/artifact/MavenMetadataSource.java index 12f3803357..0fcb7654bc 100644 --- a/maven-project/src/main/java/org/apache/maven/project/artifact/MavenMetadataSource.java +++ b/maven-project/src/main/java/org/apache/maven/project/artifact/MavenMetadataSource.java @@ -104,21 +104,23 @@ public class MavenMetadataSource } catch ( InvalidProjectModelException e ) { - getLogger().warn( "POM for: \'" + pomArtifact + - "\' does not appear to be valid. Its will be ignored for artifact resolution.\n\nReason: " + - e.getMessage() + "\n\n" ); + getLogger().warn( "POM for \'" + pomArtifact + + "\' is invalid. It will be ignored for artifact resolution. Reason: " + e.getMessage() ); if ( getLogger().isDebugEnabled() ) { + getLogger().debug( "Reason: " + e.getMessage() ); + ModelValidationResult validationResult = e.getValidationResult(); if ( validationResult != null ) { + getLogger().debug( "\nValidation Errors:" ); for ( Iterator i = validationResult.getMessages().iterator(); i.hasNext(); ) { getLogger().debug( i.next().toString() ); } - getLogger().debug( "\n\n" ); + getLogger().debug( "\n" ); } }