Maven
  1. Maven
  2. MNG-3556

XML entity not supported in Maven 2

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Won't Fix
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: General
    • Labels:
      None

      Description

      The attached XML file defines and uses an XML entity called "&blah;". It validates in FF and in other XML parsers, but when I attempt to load it up in Maven, I get the fellowing exception:

      [INFO] Scanning for projects...
      [INFO] ------------------------------------------------------------------------
      [ERROR] FATAL ERROR
      [INFO] ------------------------------------------------------------------------
      [INFO] Error building POM (may not be this project's POM).
      
      
      Project ID: unknown
      POM Location: C:\blah\pom.xml
      
      Reason: Parse error reading POM. Reason: could not resolve entity named 'blah' (position: START_TAG seen ...</version>\r\n  <name>&blah;... @11:15)  for project unknown at C:\blah\pom.xml
      
      
      [INFO] ------------------------------------------------------------------------
      [INFO] Trace
      org.apache.maven.reactor.MavenExecutionException: Parse error reading POM. Reason: could not resolve entity named 'blah' (position: START_TAG seen ...</version>\r\n  <name>&blah;... @11:15)  for project unknown at C:\blah\pom.xml
              at org.apache.maven.DefaultMaven.getProjects(DefaultMaven.java:376)
              at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:289)
              at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:126)
              at org.apache.maven.cli.MavenCli.main(MavenCli.java:282)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
              at java.lang.reflect.Method.invoke(Method.java:597)
              at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
              at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
              at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
              at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
      Caused by: org.apache.maven.project.InvalidProjectModelException: Parse error reading POM. Reason: could not resolve entity named 'blah' (position: START_TAG seen ...</version>\r\n  <name>&blah;... @11:15)  for project unknown at C:\blah\pom.xml
              at org.apache.maven.project.DefaultMavenProjectBuilder.readModel(DefaultMavenProjectBuilder.java:1416)
              at org.apache.maven.project.DefaultMavenProjectBuilder.readModel(DefaultMavenProjectBuilder.java:1377)
              at org.apache.maven.project.DefaultMavenProjectBuilder.buildFromSourceFileInternal(DefaultMavenProjectBuilder.java:474)
              at org.apache.maven.project.DefaultMavenProjectBuilder.build(DefaultMavenProjectBuilder.java:197)
              at org.apache.maven.DefaultMaven.getProject(DefaultMaven.java:548)
              at org.apache.maven.DefaultMaven.collectProjects(DefaultMaven.java:458)
              at org.apache.maven.DefaultMaven.getProjects(DefaultMaven.java:362)
              ... 11 more
      Caused by: org.codehaus.plexus.util.xml.pull.XmlPullParserException: could not resolve entity named 'blah' (position: START_TAG seen ...</version>\r\n  <name>&blah;... @11:15)
              at org.codehaus.plexus.util.xml.pull.MXParser.nextImpl(MXParser.java:1282)
              at org.codehaus.plexus.util.xml.pull.MXParser.next(MXParser.java:1093)
              at org.codehaus.plexus.util.xml.pull.MXParser.nextText(MXParser.java:1058)
              at org.apache.maven.model.io.xpp3.MavenXpp3Reader.parseModel(MavenXpp3Reader.java:2050)
              at org.apache.maven.model.io.xpp3.MavenXpp3Reader.read(MavenXpp3Reader.java:4422)
              at org.apache.maven.project.DefaultMavenProjectBuilder.readModel(DefaultMavenProjectBuilder.java:1412)
              ... 17 more
      [INFO] ------------------------------------------------------------------------
      [INFO] Total time: < 1 second
      [INFO] Finished at: Mon Apr 28 14:43:06 PDT 2008
      [INFO] Final Memory: 1M/4M
      [INFO] ------------------------------------------------------------------------
      
      1. pom.xml
        0.5 kB
        Dan Fabulich

        Activity

        No work has yet been logged on this issue.

          People

          • Assignee:
            Unassigned
            Reporter:
            Dan Fabulich
          • Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development