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

[jira] Created: (MNG-3926) Spaces if properties are not preserved if using CDATA

Spaces if properties are not preserved if using CDATA
-----------------------------------------------------

                 Key: MNG-3926
                 URL: http://jira.codehaus.org/browse/MNG-3926
             Project: Maven 2
          Issue Type: Bug
    Affects Versions: 2.0.9
            Reporter: Stefan Franke


Using a property like this one:

    <properties>
        <cdata><![CDATA[           ]]></cdata>
    </properties>

results into an empty property (see effective-pom):

    <properties>
        <cdata/>
    </properties>

which is wrong.
See also the XML spec:

"Note that a CDATA section containing only white space or a reference to an entity whose replacement text is character references expanding to white space do not match the nonterminal S"

which also stats that white spaces inside CDATA must not be trimmed away.



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

        

[jira] Updated: (MNG-3926) Spaces if properties are not preserved if using CDATA

Posted by "Brett Porter (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MNG-3926?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Brett Porter updated MNG-3926:
------------------------------

         Priority: Trivial  (was: Major)
    Fix Version/s:     (was: 2.2.x (to be reviewed))
                   Backlog

a very minor issue, but we should be trimming the xml source by its rules and not the properties in the model

> Spaces if properties are not preserved if using CDATA
> -----------------------------------------------------
>
>                 Key: MNG-3926
>                 URL: http://jira.codehaus.org/browse/MNG-3926
>             Project: Maven 2 & 3
>          Issue Type: Bug
>    Affects Versions: 2.0.9
>            Reporter: Stefan Franke
>            Priority: Trivial
>             Fix For: Backlog
>
>
> Using a property like this one:
>     <properties>
>         <cdata><![CDATA[           ]]></cdata>
>     </properties>
> results into an empty property (see effective-pom):
>     <properties>
>         <cdata/>
>     </properties>
> which is wrong.
> See also the XML spec:
> "Note that a CDATA section containing only white space or a reference to an entity whose replacement text is character references expanding to white space do not match the nonterminal S"
> which also stats that white spaces inside CDATA must not be trimmed away.

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

        

[jira] Updated: (MNG-3926) Spaces if properties are not preserved if using CDATA

Posted by "Brett Porter (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MNG-3926?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Brett Porter updated MNG-3926:
------------------------------

    Fix Version/s: 2.0.x

> Spaces if properties are not preserved if using CDATA
> -----------------------------------------------------
>
>                 Key: MNG-3926
>                 URL: http://jira.codehaus.org/browse/MNG-3926
>             Project: Maven 2
>          Issue Type: Bug
>    Affects Versions: 2.0.9
>            Reporter: Stefan Franke
>             Fix For: 2.0.x
>
>
> Using a property like this one:
>     <properties>
>         <cdata><![CDATA[           ]]></cdata>
>     </properties>
> results into an empty property (see effective-pom):
>     <properties>
>         <cdata/>
>     </properties>
> which is wrong.
> See also the XML spec:
> "Note that a CDATA section containing only white space or a reference to an entity whose replacement text is character references expanding to white space do not match the nonterminal S"
> which also stats that white spaces inside CDATA must not be trimmed away.

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

        

[jira] Commented: (MNG-3926) Spaces if properties are not preserved if using CDATA

Posted by "Brett Porter (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-3926?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=158812#action_158812 ] 

Brett Porter commented on MNG-3926:
-----------------------------------

do you have a use case for this?

The property is recorded properly, however it is trimmed (as a property, not xml content). However, it works if there is something either side, or other cdata content.

As for the effective POM, the resulting POM is stripped of all directives, not as a way to preserve the original representation.

> Spaces if properties are not preserved if using CDATA
> -----------------------------------------------------
>
>                 Key: MNG-3926
>                 URL: http://jira.codehaus.org/browse/MNG-3926
>             Project: Maven 2
>          Issue Type: Bug
>    Affects Versions: 2.0.9
>            Reporter: Stefan Franke
>             Fix For: 2.0.x
>
>
> Using a property like this one:
>     <properties>
>         <cdata><![CDATA[           ]]></cdata>
>     </properties>
> results into an empty property (see effective-pom):
>     <properties>
>         <cdata/>
>     </properties>
> which is wrong.
> See also the XML spec:
> "Note that a CDATA section containing only white space or a reference to an entity whose replacement text is character references expanding to white space do not match the nonterminal S"
> which also stats that white spaces inside CDATA must not be trimmed away.

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

        

[jira] Commented: (MNG-3926) Spaces if properties are not preserved if using CDATA

Posted by "Stefan Franke (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-3926?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=158831#action_158831 ] 

Stefan Franke commented on MNG-3926:
------------------------------------

one use case is this

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-eclipse-plugin</artifactId>
<configuration>
<additionalConfig>
<file>
<name>.checkstyle</name>
<url>file://path/to/file</url>
<content>${varies}</content>
</file>
</additionalConfig>
</configuration>

if ${varies} is unset, the url is used.
if ${varies} is set its content is used.
But creating an empty file does not work.

> Spaces if properties are not preserved if using CDATA
> -----------------------------------------------------
>
>                 Key: MNG-3926
>                 URL: http://jira.codehaus.org/browse/MNG-3926
>             Project: Maven 2
>          Issue Type: Bug
>    Affects Versions: 2.0.9
>            Reporter: Stefan Franke
>             Fix For: 2.0.x
>
>
> Using a property like this one:
>     <properties>
>         <cdata><![CDATA[           ]]></cdata>
>     </properties>
> results into an empty property (see effective-pom):
>     <properties>
>         <cdata/>
>     </properties>
> which is wrong.
> See also the XML spec:
> "Note that a CDATA section containing only white space or a reference to an entity whose replacement text is character references expanding to white space do not match the nonterminal S"
> which also stats that white spaces inside CDATA must not be trimmed away.

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