maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brent N Atkinson (JIRA)" <j...@codehaus.org>
Subject [jira] Commented: (MPLUGIN-148) PluginXdocGenerator generates poorly formed output when default values contain XML
Date Thu, 05 Mar 2009 22:16:12 GMT

    [ http://jira.codehaus.org/browse/MPLUGIN-148?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=168079#action_168079
] 

Brent N Atkinson commented on MPLUGIN-148:
------------------------------------------

It's also worth noting that because the xdoc generated is poorly formed, it causes the site
plugin to choke on it. The original manifestation of the issues was the following stack trace:



{noformat}
$ mvn clean site:stage -DciProfile
...
INFO] [site:stage]
[INFO] Unable to load parent project from a relative path: Could not find the model file 'C:\cygwin\home\batkinson\maven-jspdeclare-plugin\..\pom.xml'.
for project unknown
[INFO] Parent project loaded from repository.
[INFO] Unable to load parent project from a relative path: Could not find the model file 'C:\cygwin\home\batkinson\maven-jspdeclare-plugin\..\pom.xml'.
for project unknown
[INFO] Parent project loaded from repository.
[INFO] snapshot edu.maine.usm.dbas.usmsiteskin:usmsiteskin:1.0-SNAPSHOT: checking for updates
from snapshots
[INFO] Generating "Plugin Documentation" report.
[INFO] Using 2 extractors.
[INFO] Applying extractor for language: java
[INFO] Extractor for language: java found 1 mojo descriptors.
[INFO] Applying extractor for language: bsh
[INFO] Extractor for language: bsh found 0 mojo descriptors.
[INFO] Generating "Plugin Management" report.
[INFO] Generating "Mailing Lists" report.
[INFO] Generating "Continuous Integration" report.
[INFO] Generating "Project License" report.
[INFO] Generating "Project Team" report.
[INFO] Generating "Source Repository" report.
[INFO] Generating "About" report.
[INFO] Generating "Issue Tracking" report.
[INFO] Generating "Project Summary" report.
[INFO] Generating "Project Plugins" report.
[INFO] Generating "Dependencies" report.
[ERROR] Error parsing C:\cygwin\home\batkinson\maven-jspdeclare-plugin\target\generated-site\xdoc\declare-jsps-mojo.xml:
line [-1] Error parsing the model: end tag name </web-app> must match start tag name
<code> from line 65 (position: START_TAG seen ...</strong>: <code></web-app>...
@65:83) 
org.apache.maven.doxia.parser.ParseException: Error parsing the model: end tag name </web-app>
must match start tag name <code> from line 65 (position: START_TAG seen ...</strong>:
<code></web-app>... @65:83) 
        at org.apache.maven.doxia.parser.AbstractXmlParser.parse(AbstractXmlParser.java:57)
        at org.apache.maven.doxia.module.xdoc.XdocParser.parse(XdocParser.java:99)
        at org.apache.maven.doxia.DefaultDoxia.parse(DefaultDoxia.java:59)
        at org.apache.maven.doxia.siterenderer.DefaultSiteRenderer.renderDocument(DefaultSiteRenderer.java:342)
        at org.apache.maven.doxia.siterenderer.DoxiaDocumentRenderer.renderDocument(DoxiaDocumentRenderer.java:46)
        at org.apache.maven.doxia.siterenderer.DefaultSiteRenderer.renderModule(DefaultSiteRenderer.java:269)
        at org.apache.maven.doxia.siterenderer.DefaultSiteRenderer.render(DefaultSiteRenderer.java:101)
        at org.apache.maven.plugins.site.SiteMojo.renderLocale(SiteMojo.java:137)
        at org.apache.maven.plugins.site.SiteMojo.execute(SiteMojo.java:96)
        at org.apache.maven.plugins.site.SiteStageMojo.execute(SiteStageMojo.java:105)
        at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:451)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:558)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:512)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:482)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:330)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:291)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:142)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:336)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:129)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:287)
        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:585)
        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.codehaus.plexus.util.xml.pull.XmlPullParserException: end tag name </web-app>
must match start tag name <code> from line 65 (position: START_TAG seen ...</strong>:
<code></web-app>... @65:83) 
        at org.codehaus.plexus.util.xml.pull.MXParser.parseEndTag(MXParser.java:1689)
        at org.codehaus.plexus.util.xml.pull.MXParser.nextImpl(MXParser.java:1172)
        at org.codehaus.plexus.util.xml.pull.MXParser.next(MXParser.java:1093)
        at org.apache.maven.doxia.parser.AbstractXmlParser.parseXml(AbstractXmlParser.java:117)
        at org.apache.maven.doxia.parser.AbstractXmlParser.parse(AbstractXmlParser.java:53)
        ... 27 more

{noformat}

> PluginXdocGenerator generates poorly formed output when default values contain XML
> ----------------------------------------------------------------------------------
>
>                 Key: MPLUGIN-148
>                 URL: http://jira.codehaus.org/browse/MPLUGIN-148
>             Project: Maven 2.x Plugin Tools
>          Issue Type: Bug
>          Components: API
>    Affects Versions: 2.4.3, 2.5
>            Reporter: Brent N Atkinson
>         Attachments: MPLUGIN-148.patch
>
>
> Due to changes made in revision 684062, PluginXDocGenerator no longer handles defalultValues
properly. Before, the routines depended on org.codehaus.plexus.util.xml.PrettyPrintXMLWriter's
method writeText (which escaped XML). Since the change to using pure ResourceBundle interpolation,
the values are no longer escaped. The following excerpt shows the offending changes:
> <pre>
> --- maven/plugin-tools/trunk/maven-plugin-tools-api/src/main/java/org/apache/maven/tools/plugin/generator/PluginXdocGenerator.java
2008/08/08 19:24:21	684061
> +++ maven/plugin-tools/trunk/maven-plugin-tools-api/src/main/java/org/apache/maven/tools/plugin/generator/PluginXdocGenerator.java
2008/08/08 19:28:52	684062
> ...
> @@ -532,15 +526,13 @@
>              }
>              else
>              {
> -                description = getBundle( locale ).getString( "pluginxdoc.nodescription"
);
> +                description = getString( "pluginxdoc.nodescription" );
>              }
>              w.writeMarkup( description + "<br/>" );
>  
>              if ( StringUtils.isNotEmpty( parameter.getDefaultValue() ) )
>              {
> -                w.writeMarkup( "<strong>" + getBundle( locale ).getString( "pluginxdoc.mojodescriptor.parameter.defaultValue"
) + "</strong>: <code>" );
> -                w.writeText( parameter.getDefaultValue() );
> -                w.writeMarkup( "</code>." );
> +                w.writeMarkup( format( "pluginxdoc.mojodescriptor.parameter.defaultValue",
parameter.getDefaultValue() ) );
>              }
>              w.endElement();//td
>              w.endElement(); //tr
> </pre>

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message