You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Dennis Lundberg (JIRA)" <ji...@codehaus.org> on 2008/07/20 16:24:26 UTC

[jira] Commented: (MSITE-342) Module name with double quotes breaks site descriptor

    [ http://jira.codehaus.org/browse/MSITE-342?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=142510#action_142510 ] 

Dennis Lundberg commented on MSITE-342:
---------------------------------------

This probably belongs in maven-doxia-tools.

Here's a snippet from DefaultSiteTool.getInterpolatedSiteDescriptorContent( Map props, MavenProject project, String siteDescriptorContent, String inputEncoding, String outputEncoding )

{code}
        RegexBasedInterpolator interpolator = new RegexBasedInterpolator();

        try
        {
            interpolator.addValueSource( new EnvarBasedValueSource() );
        }
        catch ( IOException e )
        {
            // Prefer logging?
            throw new SiteToolException( "IOException: cannot interpolate environment properties: " + e.getMessage(),
                                         e );
        }

        interpolator.addValueSource( new ObjectBasedValueSource( project ) );

        interpolator.addValueSource( new MapBasedValueSource( project.getProperties() ) );

        siteDescriptorContent = interpolator.interpolate( siteDescriptorContent, "project" );
{code}

Is it the responsibility of the Interpolator to handle the conversion of double quote into an entity, or is it the responsibility of the SiteTool to fix this in siteDescriptorContent?

> Module name with double quotes breaks site descriptor
> -----------------------------------------------------
>
>                 Key: MSITE-342
>                 URL: http://jira.codehaus.org/browse/MSITE-342
>             Project: Maven 2.x Site Plugin
>          Issue Type: Bug
>            Reporter: Vladimir Tsukur
>            Priority: Minor
>
> Plugin doesn't work when there are double quotes in the module name.
> E.g. the name of the module is specified as follows:
>     <name>"flushpongle" Framework</name>
> or in this way:
>     <name>&quot;flushpongle&quot; Framework</name>
> If you try to execute 'mvn site' on a module that have double quotes in its name, you recieve the following error:
> [ERROR] BUILD ERROR
> [INFO] ------------------------------------------------------------------------
> [INFO] Error parsing site descriptor
> Embedded error: expected = after attribute name (position: START_DOCUMENT seen ...mitations\r\nunder the License.\r\n-->\r\n\r\n<project name=""flushpongle"... @21:29)
> So, the name of the module is taken 'as is' for the value of name attribute. Inner double quotes makes output invalid.

-- 
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