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

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.0.11, 2.2.1, 3.0-alpha-6
    • Fix Version/s: 3.0-alpha-7
    • Component/s: POM
    • Labels:
      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

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

                Dates

                • Created:
                  Updated:
                  Resolved: