Uploaded image for project: 'Velocity'
  1. Velocity
  2. VELOCITY-742

Easily Add/Remove/Replace Directives Without Cracking Open Velocity Jar

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.6.2
    • Fix Version/s: 1.7
    • Component/s: Engine
    • Labels:
      None

      Description

      There are two use cases that I have for this issue:

      1) We need to turn off #include in order to parse .html files that include SSI directives: <!-#include virtual=""-> (we always use #parse in our world, so no loss for #include going away)

      2) We need to supply our own version of #parse that contains the development hooks that I described in a different issue.

      Right now, the only crisp way to do is is to crack open the velocity .jar and make these changes, which is very risky, because future developers may upgrade to new versions of Velocity and not realize that there are customizations and/or not understand how to remake them....not to mention in a shared-classpath environment, we don't always have control over which copy of the Velocity .jar we're using.

      Ideally, there would be config options like this:

      directive_remove ("#parse", "#include")
      directive_add ("#parse", "com.qwest.velocity.directives.Parse")

      Thanks!

      Tim

        Attachments

        1. velocity-742.patch
          10 kB
          Jarkko Viinamäki

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              cyface Tim White
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: