You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Dimitri Alexeev (JIRA)" <ji...@codehaus.org> on 2012/11/13 14:42:13 UTC

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

    [ https://jira.codehaus.org/browse/MNG-4572?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=313457#comment-313457 ] 

Dimitri Alexeev commented on MNG-4572:
--------------------------------------

Is there any chance to fix this also in the 2.2.x branch?

                
> <modelVersion> element in pom does not allow whitespace around version string
> -----------------------------------------------------------------------------
>
>                 Key: MNG-4572
>                 URL: https://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, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira