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

[jira] Created: (MNG-3443) boolean values in the POM specified as expressions are not interpolated, result in value == false

boolean values in the POM specified as expressions are not interpolated, result in value == false
-------------------------------------------------------------------------------------------------

                 Key: MNG-3443
                 URL: http://jira.codehaus.org/browse/MNG-3443
             Project: Maven 2
          Issue Type: Bug
          Components: POM
    Affects Versions: 2.0.8, 2.1-alpha-1
            Reporter: John Casey
         Attachments: interpolate-boolean-expression.zip

The problem is the ModelReader generated by Modello uses something akin to Boolean.valueOf( element.getValue() ) to set boolean model values. If the value in XML is actually an expression, it is resolved to false and never interpolated.

To correct this, we should consider revising Modelllo's generated reader architecture to use a two-stage approach:

1. Construct a raw structure of String: String and String: Collection associations (basically something like a perlish hash, IIRC)
2. Pass an arbitrary number of transformers over the raw structure to interpolate it (this includes path translation, etc. and should include a notion of transformation context to allow transformations to collaborate)
3. Construct the Model instance based on the transformed raw structure.

This will incur a little extra transient overhead for model construction, but its effects should be mitigated through the caching strategies we employ for models and projects.

-- 
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-3443) boolean values in the POM specified as expressions are not interpolated, result in value == false

Posted by "Benjamin Bentmann (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-3443?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=153819#action_153819 ] 

Benjamin Bentmann commented on MNG-3443:
----------------------------------------

This duplicates MNG-1995 (its IT has been enriched with the test proposed here, just in case).

> boolean values in the POM specified as expressions are not interpolated, result in value == false
> -------------------------------------------------------------------------------------------------
>
>                 Key: MNG-3443
>                 URL: http://jira.codehaus.org/browse/MNG-3443
>             Project: Maven 2
>          Issue Type: Bug
>          Components: POM
>    Affects Versions: 2.0.8, 2.0.9, 3.0-alpha-1
>            Reporter: John Casey
>             Fix For: 2.0.x
>
>         Attachments: interpolate-boolean-expression.zip
>
>
> The problem is the ModelReader generated by Modello uses something akin to Boolean.valueOf( element.getValue() ) to set boolean model values. If the value in XML is actually an expression, it is resolved to false and never interpolated.
> To correct this, we should consider revising Modelllo's generated reader architecture to use a two-stage approach:
> 1. Construct a raw structure of String: String and String: Collection associations (basically something like a perlish hash, IIRC)
> 2. Pass an arbitrary number of transformers over the raw structure to interpolate it (this includes path translation, etc. and should include a notion of transformation context to allow transformations to collaborate)
> 3. Construct the Model instance based on the transformed raw structure.
> This will incur a little extra transient overhead for model construction, but its effects should be mitigated through the caching strategies we employ for models and projects.

-- 
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-3443) boolean values in the POM specified as expressions are not interpolated, result in value == false

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

John Casey updated MNG-3443:
----------------------------

    Affects Version/s: 2.0.9

> boolean values in the POM specified as expressions are not interpolated, result in value == false
> -------------------------------------------------------------------------------------------------
>
>                 Key: MNG-3443
>                 URL: http://jira.codehaus.org/browse/MNG-3443
>             Project: Maven 2
>          Issue Type: Bug
>          Components: POM
>    Affects Versions: 2.0.8, 2.0.9, 2.1-alpha-1
>            Reporter: John Casey
>         Attachments: interpolate-boolean-expression.zip
>
>
> The problem is the ModelReader generated by Modello uses something akin to Boolean.valueOf( element.getValue() ) to set boolean model values. If the value in XML is actually an expression, it is resolved to false and never interpolated.
> To correct this, we should consider revising Modelllo's generated reader architecture to use a two-stage approach:
> 1. Construct a raw structure of String: String and String: Collection associations (basically something like a perlish hash, IIRC)
> 2. Pass an arbitrary number of transformers over the raw structure to interpolate it (this includes path translation, etc. and should include a notion of transformation context to allow transformations to collaborate)
> 3. Construct the Model instance based on the transformed raw structure.
> This will incur a little extra transient overhead for model construction, but its effects should be mitigated through the caching strategies we employ for models and projects.

-- 
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-3443) boolean values in the POM specified as expressions are not interpolated, result in value == false

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

John Casey updated MNG-3443:
----------------------------

    Attachment: interpolate-boolean-expression.zip

Attaching a test case. See `mvn help:effective-pom`, or the effective-pom.txt file included in the zip, and pay particular attention to the repository with id "interpolated".

> boolean values in the POM specified as expressions are not interpolated, result in value == false
> -------------------------------------------------------------------------------------------------
>
>                 Key: MNG-3443
>                 URL: http://jira.codehaus.org/browse/MNG-3443
>             Project: Maven 2
>          Issue Type: Bug
>          Components: POM
>    Affects Versions: 2.0.8, 2.0.9, 2.1-alpha-1
>            Reporter: John Casey
>         Attachments: interpolate-boolean-expression.zip
>
>
> The problem is the ModelReader generated by Modello uses something akin to Boolean.valueOf( element.getValue() ) to set boolean model values. If the value in XML is actually an expression, it is resolved to false and never interpolated.
> To correct this, we should consider revising Modelllo's generated reader architecture to use a two-stage approach:
> 1. Construct a raw structure of String: String and String: Collection associations (basically something like a perlish hash, IIRC)
> 2. Pass an arbitrary number of transformers over the raw structure to interpolate it (this includes path translation, etc. and should include a notion of transformation context to allow transformations to collaborate)
> 3. Construct the Model instance based on the transformed raw structure.
> This will incur a little extra transient overhead for model construction, but its effects should be mitigated through the caching strategies we employ for models and projects.

-- 
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] Closed: (MNG-3443) boolean values in the POM specified as expressions are not interpolated, result in value == false

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

Brett Porter closed MNG-3443.
-----------------------------

         Assignee: Brett Porter
       Resolution: Duplicate
    Fix Version/s:     (was: 2.0.x)

> boolean values in the POM specified as expressions are not interpolated, result in value == false
> -------------------------------------------------------------------------------------------------
>
>                 Key: MNG-3443
>                 URL: http://jira.codehaus.org/browse/MNG-3443
>             Project: Maven 2
>          Issue Type: Bug
>          Components: POM
>    Affects Versions: 2.0.8, 2.0.9, 3.0-alpha-1
>            Reporter: John Casey
>            Assignee: Brett Porter
>         Attachments: interpolate-boolean-expression.zip
>
>
> The problem is the ModelReader generated by Modello uses something akin to Boolean.valueOf( element.getValue() ) to set boolean model values. If the value in XML is actually an expression, it is resolved to false and never interpolated.
> To correct this, we should consider revising Modelllo's generated reader architecture to use a two-stage approach:
> 1. Construct a raw structure of String: String and String: Collection associations (basically something like a perlish hash, IIRC)
> 2. Pass an arbitrary number of transformers over the raw structure to interpolate it (this includes path translation, etc. and should include a notion of transformation context to allow transformations to collaborate)
> 3. Construct the Model instance based on the transformed raw structure.
> This will incur a little extra transient overhead for model construction, but its effects should be mitigated through the caching strategies we employ for models and projects.

-- 
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-3443) boolean values in the POM specified as expressions are not interpolated, result in value == false

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

Brett Porter updated MNG-3443:
------------------------------

    Fix Version/s: 2.0.x

> boolean values in the POM specified as expressions are not interpolated, result in value == false
> -------------------------------------------------------------------------------------------------
>
>                 Key: MNG-3443
>                 URL: http://jira.codehaus.org/browse/MNG-3443
>             Project: Maven 2
>          Issue Type: Bug
>          Components: POM
>    Affects Versions: 2.0.8, 2.0.9, 2.1-alpha-1
>            Reporter: John Casey
>             Fix For: 2.0.x
>
>         Attachments: interpolate-boolean-expression.zip
>
>
> The problem is the ModelReader generated by Modello uses something akin to Boolean.valueOf( element.getValue() ) to set boolean model values. If the value in XML is actually an expression, it is resolved to false and never interpolated.
> To correct this, we should consider revising Modelllo's generated reader architecture to use a two-stage approach:
> 1. Construct a raw structure of String: String and String: Collection associations (basically something like a perlish hash, IIRC)
> 2. Pass an arbitrary number of transformers over the raw structure to interpolate it (this includes path translation, etc. and should include a notion of transformation context to allow transformations to collaborate)
> 3. Construct the Model instance based on the transformed raw structure.
> This will incur a little extra transient overhead for model construction, but its effects should be mitigated through the caching strategies we employ for models and projects.

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