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)
Signup
Maven 2.x Changes Plugin
  • Maven 2.x Changes Plugin
  • MCHANGES-97

Fix VTL errors

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Improvement Improvement
  • Status: Closed Closed
  • Priority: Trivial Trivial
  • Resolution: Fixed
  • Affects Version/s: 2.0-beta-3
  • Fix Version/s: 2.0
  • Component/s: announcement
  • Labels:
    None
  • Patch Submitted:
    Yes
  • Number of attachments :
    3

Description

When calling mvn changes:announcement-generate for the attached changes.xml VTL errors are logged due to the various null fields in the Action bean:

[INFO] [changes:announcement-generate]
[INFO] Creating announcement file from changes.xml...
[ERROR] RHS of #set statement is null. Context will not be modified. org/apache/maven/plugin/announcement/announcement.vm [line 30, column 1]
[ERROR] RHS of #set statement is null. Context will not be modified. org/apache/maven/plugin/announcement/announcement.vm [line 31, column 1]
[ERROR] Left side ($!issue) of '!=' operation has null value. Operation not possible. org/apache/maven/plugin/announcement/announcement.vm [line 32, column 27]
[ERROR] Left side ($!dueto) of '!=' operation has null value. Operation not possible. org/apache/maven/plugin/announcement/announcement.vm [line 32, column 65]
[ERROR] RHS of #set statement is null. Context will not be modified. org/apache/maven/plugin/announcement/announcement.vm [line 43, column 1]
[ERROR] RHS of #set statement is null. Context will not be modified. org/apache/maven/plugin/announcement/announcement.vm [line 44, column 1]
[ERROR] RHS of #set statement is null. Context will not be modified. org/apache/maven/plugin/announcement/announcement.vm [line 56, column 1]
[ERROR] RHS of #set statement is null. Context will not be modified. org/apache/maven/plugin/announcement/announcement.vm [line 57, column 1]
[ERROR] RHS of #set statement is null. Context will not be modified. org/apache/maven/plugin/announcement/announcement.vm [line 69, column 1]
[ERROR] RHS of #set statement is null. Context will not be modified. org/apache/maven/plugin/announcement/announcement.vm [line 70, column 1]
[INFO] File created...

The attached patch goes the hard way and improves the VTL template to check for nulls. Easier would be to establish an invariant for the bean properties stating that they are never null but maybe empty, i.e. change all the setters to convert null into an empty string.

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

Attachments

  1. XML File
    changes.xml
    22/Jan/08 5:26 PM
    0.8 kB
    Benjamin Bentmann
  2. Hide
    Zip Archive
    MCHANGES-97.zip
    02/Feb/08 1:29 PM
    5 kB
    Benjamin Bentmann
    1. Text File
      MCHANGES-97/debug.log 31 kB
    2. XML File
      MCHANGES-97/pom.xml 0.7 kB
    3. XML File
      MCHANGES-97/src/changes/changes.xml 0.8 kB
    Download Zip
    Show
    Zip Archive
    MCHANGES-97.zip
    02/Feb/08 1:29 PM
    5 kB
    Benjamin Bentmann
  3. Text File
    vtl-errors.patch
    22/Jan/08 5:26 PM
    3 kB
    Benjamin Bentmann

Activity

Ascending order - Click to sort in descending order
  • All
  • Comments
  • Work Log
  • History
  • Activity
Benjamin Bentmann made changes - 02/Feb/08 1:29 PM
Field Original Value New Value
Attachment MCHANGES-97.zip [ 32318 ]
Dennis Lundberg made changes - 05/Feb/08 5:32 PM
Fix Version/s 2.0-beta-4 [ 13722 ]
Resolution Fixed [ 1 ]
Status Open [ 1 ] Closed [ 6 ]
Assignee Dennis Lundberg [ dennislundberg ]

People

  • Assignee:
    Dennis Lundberg
    Reporter:
    Benjamin Bentmann
Vote (0)
Watch (1)

Dates

  • Created:
    22/Jan/08 5:26 PM
    Updated:
    05/Feb/08 5:32 PM
    Resolved:
    05/Feb/08 5:32 PM
  • Atlassian JIRA (v5.2.7#850-sha1:b2af0c8)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Codehaus. Try JIRA - bug tracking software for your team.