maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bentm...@apache.org
Subject svn commit: r825944 - /maven/maven-3/trunk/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelBuilder.java
Date Fri, 16 Oct 2009 15:33:34 GMT
Author: bentmann
Date: Fri Oct 16 15:33:34 2009
New Revision: 825944

URL: http://svn.apache.org/viewvc?rev=825944&view=rev
Log:
o Improved error reporting

Modified:
    maven/maven-3/trunk/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelBuilder.java

Modified: maven/maven-3/trunk/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelBuilder.java
URL: http://svn.apache.org/viewvc/maven/maven-3/trunk/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelBuilder.java?rev=825944&r1=825943&r2=825944&view=diff
==============================================================================
--- maven/maven-3/trunk/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelBuilder.java
(original)
+++ maven/maven-3/trunk/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelBuilder.java
Fri Oct 16 15:33:34 2009
@@ -310,7 +310,7 @@
             }
             catch ( ModelParseException e )
             {
-                if ( !strict || pomFile != null )
+                if ( !strict )
                 {
                     throw e;
                 }
@@ -319,7 +319,14 @@
 
                 model = modelProcessor.read( modelSource.getInputStream(), options );
 
-                problems.addWarning( "Malformed POM " + modelSource.getLocation() + ": "
+ e.getMessage(), e );
+                if ( pomFile != null )
+                {
+                    problems.addError( "Malformed POM " + modelSource.getLocation() + ":
" + e.getMessage(), e );
+                }
+                else
+                {
+                    problems.addWarning( "Malformed POM " + modelSource.getLocation() + ":
" + e.getMessage(), e );
+                }
             }
         }
         catch ( ModelParseException e )



Mime
View raw message