<modelVersion> element in pom does not allow whitespace around version string
-----------------------------------------------------------------------------
Key: MNG-4572
URL: http://jira.codehaus.org/browse/MNG-4572
Project: Maven 2 & 3
Issue Type: Bug
Components: POM
Affects Versions: 2.2.1
Reporter: jonathan gold
Attachments: pom.xml, t.txt
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." ); }
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira