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:08:13 GMT

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

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

It appears that the maven-jspc-plugin suffers from this when using newer plugin releases.
By using 2.4.2 or earlier it works around the issue. the following pom.xml section works around
this until the fix is released:

{code:xml}
<reporting>
        <plugins>
                  <plugin>
                            <groupId>org.apache.maven.plugins</groupId>
                            <artifactId>maven-plugin-plugin</artifactId>
                            <version>2.4.2</version>
                   </plugin>
         </plugins>
</reporting>
{code}

> 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