Search code examples
javavelocity

Is there a way to print the version of the running Apache Velocity instance in a template?


I have a weird problem while parsing a Velocity template which gives me an exception similar to this problem where the user can't create a Map. I want to make sure that I don't use an old version of Velocity. How can I print the version of the Velocity being used in my template? (Or in any other way)


Solution

  • You can check Apache Velocity version within the MANIFEST file inside velocity.jar

    Specification-Vendor: Apache Software Foundation
    Implementation-Title: org.apache.velocity
    Implementation-Vendor-Id: org.apache
    Implementation-Vendor: Apache Software Foundation
    Implementation-Version: 1.7