Uploaded image for project: 'Maven Archetype'
  1. Maven Archetype
  2. ARCHETYPE-475

Each template file should have its own Velocity context

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Auto Closed
    • 2.2
    • None
    • Generator
    • None

    Description

      Right now, when generating a project from an archetype, all template files are merged with the same Velocity context. This has the side effect that changes to the Velocity context in one template file are reflected in all subsequent template files. Consider the following example:

      #set ($foo = "bar")
      

      This is a change to the Velocity context. Once it has been done, it's visible in all template files which get subsequently merged with the global Velocity context. This is bad because it's unexpected and uncontrollable because users have no control over the order of processing.

      Attachments

        Activity

          People

            Unassigned Unassigned
            christians Christian Schlichtherle
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: