You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Michael Osipov (JIRA)" <ji...@apache.org> on 2016/05/15 18:06:12 UTC

[jira] [Comment Edited] (MNG-6020) Maven fails to detect pom.xml XML syntax error

    [ https://issues.apache.org/jira/browse/MNG-6020?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15283891#comment-15283891 ] 

Michael Osipov edited comment on MNG-6020 at 5/15/16 6:05 PM:
--------------------------------------------------------------

Issue confirmed but this isn't Maven but Plexus Modello. Due to its pull nature, it reads from the stream until is has everything it needs. The rest is completely ignored. See [{{MavenXpp3ReaderEx#read(XmlPullParser, boolean, InputSource)}}|https://maven.apache.org/ref/3.3.9/maven-model/xref/org/apache/maven/model/io/xpp3/MavenXpp3ReaderEx.html#L4376]. One would probably need to enable one of [these|http://xmlpull.org/v1/doc/features.html] features. Please raise an issue with [Modello|https://github.com/codehaus-plexus/modello/issues].


was (Author: michael-o):
Issue confirmed but this isn't Maven but Plexus Modello. Due to its pull nature, it reads from the stream until is has everything it needs. The rest is completely ignored. See [{{MavenXpp3ReaderEx#read(XmlPullParser, boolean, InputSource)}}|https://maven.apache.org/ref/3.3.9/maven-model/xref/org/apache/maven/model/io/xpp3/MavenXpp3ReaderEx.html#L4376]. One would probably need to enable one of [these|http://xmlpull.org/v1/doc/features.html] features. Please raise an issue with Modello.

> Maven fails to detect pom.xml XML syntax error
> ----------------------------------------------
>
>                 Key: MNG-6020
>                 URL: https://issues.apache.org/jira/browse/MNG-6020
>             Project: Maven
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 3.2.5
>         Environment: Mac OS X
>            Reporter: Archie Cobbs
>            Priority: Minor
>
> I had a typo in my POM: there was an extra trailing {{</project>}} tag in the XML. This made the POM not be valid XML.
> Maven did not detect this error. While that may seem like a feature, it's really a bug, in particular because Maven will also happily deploy this invalid XML file.
> It led to this interesting situation which had us scratching our heads for a while; see https://issues.sonatype.org/browse/OSSRH-22411 for details.
> Recommendation: maven should throw an error if {{pom.xml}} is not valid XML.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)