Uploaded image for project: 'Maven'
  1. Maven
  2. MNG-4644

Misplaced text contents in root element of POM is not rejected by parser

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.0.11, 2.2.1, 3.0-alpha-6
    • 3.0-alpha-7
    • POM
    • None

    Description

      The POM below is invalid

      <project>
        <modelVersion>4.0.0</modelVersion>
      
        <groupId>org.apache.maven.its.mng</groupId>
        <artifactId>test</artifactId>
        This text shouldn't have been allowed...
        <version>0.1</version>
      </project>
      

      yet it's happily parsed/installed/deployed by many Maven versions. Despite using strict mode for the parser (see also MNG-3645), a subtle bug in the Modello generated XPP3 parser makes it accept misplaced text within the root element (whereas it's properly rejected in other elements).

      Attachments

        Issue Links

          Activity

            People

              hboutemy Herve Boutemy
              bentmann Benjamin Bentmann
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: