Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.2.1
-
None
Description
I'm using 2.2.x and was surprised to find that, while valid XML, the following are not valid in a pom.xml:
<modelVersion> 4.0.0 </modelVersion>
or
<modelVersion> 4.0.0 </modelVersion>
I had expected that the maven xml parser would be normalizing the whitespace, but looked in maven-2.2.x/maven-project/src/main/java/org/apache/maven/project/DefaultMavenProjectBuilder.java and found this in readModel(), line 1609:
if ( modelSource.indexOf( "<modelVersion>" + MAVEN_MODEL_VERSION ) < 0 )
{ throw new InvalidProjectModelException( projectId, pomLocation, "Not a v" + MAVEN_MODEL_VERSION + " POM." ); }