You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Benjamin Bentmann (JIRA)" <ji...@codehaus.org> on 2010/02/26 20:40:59 UTC

[jira] Closed: (MNG-4572) element in pom does not allow whitespace around version string

     [ http://jira.codehaus.org/browse/MNG-4572?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Benjamin Bentmann closed MNG-4572.
----------------------------------

       Resolution: Fixed
    Fix Version/s: 3.0-alpha-3
         Assignee: Benjamin Bentmann

> <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
>            Assignee: Benjamin Bentmann
>             Fix For: 3.0-alpha-3
>
>         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