Velocity runs on a variety of platforms that have installed the Java Virtual Machine. The Java Development Kit version 1.6 is required for users who want to compile Velocity from its source code.
Everything required to build Velocity comes with the distribution, which can be obtained from Subversion or from the main distribution. However, you will need to install Maven to build the Velocity sources.
Maven is also an Apache project. To build Apache Velocity, you need at least Version 2.2.1 of Apache Maven.
To build Velocity we require Maven version 2.2.1 or higher (Maven 3 can be used too) to perform the build process. We assume that you have followed Maven's installation instructions and have it properly installed.
Velocity requires JDK 1.6 or greater to compile.
Finally, if you wish to modify Velocity's grammar you will need to a tool called JavaCC. We recommend version 3.2 or greater.
In each case below, it is assumed that you were successful in getting the distribution from Subversion, and were successful in unpacking. Also, it is assumed that you are starting in the 'velocity' directory, the root of the distribution tree. All directory references will be relative to 'velocity'.
Change to the build directory (
cd build). Then, to build the jar file, simply type:
Executing this script will create a target directory within the Velocity distribution directory. Each subdirectory containing a module of Velocity will contain a "target" directory too, containing all built jars. In the "velocity-assembly" module you will find built distributions.
Refer to Maven documentation for all phases you can invoke.
If you find a problem, do not hesitate to ask the Velocity community via our mail lists.