jira.codehaus.org

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What?s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
  • Maven 2.x and 3.x Site Plugin
  • MSITE-226

Missing escaping of ${project.name} for default site descriptor

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Bug Bug
  • Status: Open Open
  • Priority: Minor Minor
  • Resolution: Unresolved
  • Affects Version/s: 2.0-beta-6
  • Fix Version/s: None
  • Component/s: property interpolation, site descriptor
  • Labels:
    None
  • Environment:
    linux, maven-2.0.6

Description

It seems that when using the default site descriptor, no xml escaping is performed for name (and maybe other values).

Excerpt from pom.xml:

...
<name>Module "MyMod-1.0"</name>
...

Excerpt from build log:

...
[INFO] Error parsing site descriptor

Embedded error: expected = after attribute name (position: START_DOCUMENT seen ...ations\nunder the License.\n-->\n\n<project name="Module "MyMod-1.0"... @21:36)
[INFO] ------------------------------------------------------------------------
[DEBUG] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: Error parsing site descriptor
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:564)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:480)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:459)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:311)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:278)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:143)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:334)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:125)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:272)
...

Issue Links

depends upon

Improvement - An improvement or enhancement to an existing feature or task. PLXCOMP-118 escapeXml for interpolation

  • Major - Major loss of function.
  • Open - The issue is open and ready for the assignee to start work on it.
is depended upon by

Bug - A problem which impairs or prevents the functions of the product. MCOBERTURA-115 Embedded error when <name> contains &amp;

  • Major - Major loss of function.
  • Open - The issue is open and ready for the assignee to start work on it.
is duplicated by

Bug - A problem which impairs or prevents the functions of the product. MSITE-342 Module name with double quotes breaks site descriptor

  • Minor - Minor loss of function, or other problem where easy workaround is present.
  • Closed - The issue is considered finished, the resolution is correct. Issues which are not closed can be reopened.

Activity

Ascending order - Click to sort in descending order
  • All
  • Comments
  • Work Log
  • History
  • Activity
Hide
Permalink
Petr Kozelka added a comment - 10/Apr/07 5:35 AM

more useful part of stacktrace:

...
Caused by: org.codehaus.plexus.util.xml.pull.XmlPullParserException: expected = after attribute name (position: START_DOCUMENT seen ...ations\nunder the License.\n-->\n\n<project name="Module "MyMod-1.0"... @21:36)
at org.codehaus.plexus.util.xml.pull.MXParser.parseAttribute(MXParser.java:2001)
at org.codehaus.plexus.util.xml.pull.MXParser.parseStartTag(MXParser.java:1796)
at org.codehaus.plexus.util.xml.pull.MXParser.parseProlog(MXParser.java:1476)
at org.codehaus.plexus.util.xml.pull.MXParser.nextImpl(MXParser.java:1392)
at org.codehaus.plexus.util.xml.pull.MXParser.next(MXParser.java:1090)
at org.apache.maven.doxia.site.decoration.io.xpp3.DecorationXpp3Reader.read(DecorationXpp3Reader.java:1162)
at org.apache.maven.doxia.site.decoration.io.xpp3.DecorationXpp3Reader.read(DecorationXpp3Reader.java:1176)
at org.apache.maven.plugins.site.AbstractSiteRenderingMojo.readDecorationModel(AbstractSiteRenderingMojo.java:266)
... 22 more
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 8 seconds
[INFO] Finished at: Tue Apr 10 09:50:31 GMT 2007
[INFO] Final Memory: 12M/22M
[INFO] ------------------------------------------------------------------------

Show
Petr Kozelka added a comment - 10/Apr/07 5:35 AM more useful part of stacktrace:
... Caused by: org.codehaus.plexus.util.xml.pull.XmlPullParserException: expected = after attribute name (position: START_DOCUMENT seen ...ations\nunder the License.\n-->\n\n<project name="Module "MyMod-1.0"... @21:36) at org.codehaus.plexus.util.xml.pull.MXParser.parseAttribute(MXParser.java:2001) at org.codehaus.plexus.util.xml.pull.MXParser.parseStartTag(MXParser.java:1796) at org.codehaus.plexus.util.xml.pull.MXParser.parseProlog(MXParser.java:1476) at org.codehaus.plexus.util.xml.pull.MXParser.nextImpl(MXParser.java:1392) at org.codehaus.plexus.util.xml.pull.MXParser.next(MXParser.java:1090) at org.apache.maven.doxia.site.decoration.io.xpp3.DecorationXpp3Reader.read(DecorationXpp3Reader.java:1162) at org.apache.maven.doxia.site.decoration.io.xpp3.DecorationXpp3Reader.read(DecorationXpp3Reader.java:1176) at org.apache.maven.plugins.site.AbstractSiteRenderingMojo.readDecorationModel(AbstractSiteRenderingMojo.java:266) ... 22 more [INFO] ------------------------------------------------------------------------ [INFO] Total time: 8 seconds [INFO] Finished at: Tue Apr 10 09:50:31 GMT 2007 [INFO] Final Memory: 12M/22M [INFO] ------------------------------------------------------------------------
Hide
Permalink
Dennis Lundberg added a comment - 02/Sep/07 9:36 AM

I confirm that this happens if you try to use the name in your site.xml like this:

<project>
  <body>
    <menu name="Overview for ${project.name}">
      <item name="Introduction" href="index.html"/>
      <item name="Goals" href="plugin-info.html"/>
      <item name="Usage" href="usage.html"/>
      <item name="Javadoc" href="apidocs/index.html"/>
    </menu>
  </body>
</project>

Resulting in

Embedded error: expected = after attribute name (position: TEXT seen ...<body>\r\n    <menu name="Overview for Localization "Tools"... @5:50)
Show
Dennis Lundberg added a comment - 02/Sep/07 9:36 AM I confirm that this happens if you try to use the name in your site.xml like this:
<project>
  <body>
    <menu name="Overview for ${project.name}">
      <item name="Introduction" href="index.html"/>
      <item name="Goals" href="plugin-info.html"/>
      <item name="Usage" href="usage.html"/>
      <item name="Javadoc" href="apidocs/index.html"/>
    </menu>
  </body>
</project>
Resulting in
Embedded error: expected = after attribute name (position: TEXT seen ...<body>\r\n    <menu name="Overview for Localization "Tools"... @5:50)

People

  • Assignee:
    Unassigned
    Reporter:
    Petr Kozelka
Vote (2)
Watch (2)

Dates

  • Created:
    10/Apr/07 5:17 AM
    Updated:
    26/May/11 1:18 AM
  • Atlassian JIRA (v5.0.4#731-sha1:3aa7374)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Codehaus. Try JIRA - bug tracking software for your team.