• 0.9

Primitive Wrapper for Apache Velocity

VelocityPage is a convenient builder/wrapper around Apache Velocity:

import com.jcabi.velocity.VelocityPage;
public class Main {
  public static void main(String[] args) {
    String text = new VelocityPage("/com/foo/template.vm")
      .set("name", "John Doe")
      .set("file", file)
      .set("document", doc)

The only argument of the constructor should be an absolute path of a classpath resource that contains a Velocity template. Be aware that an absolute resource path always starts with a slash.

The only dependency you need is (you can also download jcabi-velocity-0.9.jar and add it to the classpath):


Cutting Edge Version

If you want to use current version of the product, you can do it with this configuration in your pom.xml: