jira.codehaus.org

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What?s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
  • Maven 2 & 3
  • MNG-3443

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

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Duplicate
  • Affects Version/s: 2.0.8, 2.0.9, 3.0-alpha-1
  • Fix Version/s: None
  • Component/s: POM
  • Labels:
    None

Description

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.

  • Options
    • Sort By Name
    • Sort By Date
    • Ascending
    • Descending
    • Download All

Attachments

  1. Hide
    Zip Archive
    interpolate-boolean-expression.zip
    06/Mar/08 12:46 PM
    2 kB
    John Casey
    1. Text File
      interpolate-boolean-expression/effective-pom.txt 3 kB
    2. XML File
      interpolate-boolean-expression/pom.xml 0.9 kB
    Download Zip
    Show
    Zip Archive
    interpolate-boolean-expression.zip
    06/Mar/08 12:46 PM
    2 kB
    John Casey

Issue Links

duplicates

Bug - A problem which impairs or prevents the functions of the product. MNG-1995 filtering element in pom.xml ignore properties

  • Major - Major loss of function.
  • Closed - The issue is considered finished, the resolution is correct. Issues which are not closed can be reopened.

Activity

Ascending order - Click to sort in descending order
  • All
  • Comments
  • Work Log
  • History
  • Activity
Hide
Permalink
John Casey added a comment - 06/Mar/08 12:46 PM

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

Show
John Casey added a comment - 06/Mar/08 12:46 PM 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".
Hide
Permalink
Benjamin Bentmann added a comment - 11/Nov/08 9:08 AM

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

Show
Benjamin Bentmann added a comment - 11/Nov/08 9:08 AM This duplicates MNG-1995 (its IT has been enriched with the test proposed here, just in case).

People

  • Assignee:
    Brett Porter
    Reporter:
    John Casey
Vote (0)
Watch (0)

Dates

  • Created:
    06/Mar/08 12:45 PM
    Updated:
    18/Dec/08 8:34 AM
    Resolved:
    18/Dec/08 8:34 AM
  • Atlassian JIRA (v5.0.4#731-sha1:3aa7374)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Codehaus. Try JIRA - bug tracking software for your team.