Velocity dependencies

Velocity has a number of external jar dependencies. However, not all of these are needed every time.This document should help you do decide which jars must also be present if you want to integrate Velocity into your application.

jar name Required Explanation
commons-collections Yes Needed for all parts of Velocity
commons-lang Yes Needed for all parts of Velocity
oro Yes Needed for all parts of Velocity
log4j No Must only be present if log4j Logging has been selected. Not needed if Avalon logkit or jdk logging is used.
avalon-logkit (or logkit) No Must only be present if Avalon Logging has been selected. Not needed if log4j logging or jdk logging is used.
servletapi No Only needed when the VelocityServlet class is used. Should normally be supplied by the servlet container. VelocityServlet is deprecated and should be replaced with VelocityViewServlet from the velocity-tools distribution.
jdom No Only required for the Anakia tool / ant task
werken-xpath No Only required for the Anakia tool / ant task

The most common case is the integration of the Velocity runtime into your application. In this case, you must also add commons-collections, commons-lang and oro to your application (and either avalon-logkit or log4j for logging if required). If you already have one or more of these libraries in your application, you should check if you need to update their versions.