[ 
https://jira.codehaus.org/browse/MNG-5380?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=313811#comment-313811
 ] 

Herve Boutemy commented on MNG-5380:
------------------------------------

I just fixed MODELLO-256: whitespace can be preserved when reading Maven model.
This will just require to configure the model with this option, hoping Plexus 
won't trim content when injecting into objects.

But the big question is: changing the behaviour of plugin configuration will 
impact everyone. So is it reasonable?
Or should we continue trimming data and only avoid it when an attribute like 
[xml:space|http://www.xmlplease.com/xml/xmlspace/], which seems a good 
candidate?
                
> Cannot preserve whitespace in Maven plugin configuration
> --------------------------------------------------------
>
>                 Key: MNG-5380
>                 URL: https://jira.codehaus.org/browse/MNG-5380
>             Project: Maven 2 & 3
>          Issue Type: New Feature
>          Components: Plugin API
>    Affects Versions: 2.0.9, 2.2.1, 3.0, 3.0.4
>            Reporter: Laird Nelson
>
> This bug may be filed in the wrong place; for that I apologize in advance.
> My Maven plugin configuration (which I think is parsed and implemented by 
> Plexus) does not preserve leading or trailing (or only) whitespace content.
> A (mapped-to-{{String}}) configuration element like this:
> {noformat}
> <suffix>   Hello   </suffix>
> {noformat}
> results in the string value "Hello" (no leading or trailing space).  The same 
> value is produced by any one of the following constructions:
> {noformat}
> <suffix><![CDATA[   Hello   ]]></suffix>
> {noformat}
> {noformat}
> <suffix xml:space="preserve">   Hello   </suffix>
> {noformat}
> I believe this is a shortcoming of the Plexus XML configuration machinery.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to