Appendix C. Building FreeMarker

If you want to modify the source code and rebuild freemarker.jar, you need Ant 1.4 (or newer).

You have to define a dependencies.properties file in the root directory of FreeMarker distribution to tell Ant where your various .jar files are. Copy and modify one of the sample files you can find there. As you can see, you need a lot of jars; most of them can be downloaded from the Apache Software Foundation. JavaCC can be downloaded from http://javacc.dev.java.net/, but, you need version 2.x, which is not supported anymore, but maybe accessible on http://www.geocities.com/icecow88/. To download Jython, visit the Jython homepage.

If you use earlier Java platform than version 1.4, you must ensure the the standard XML related classes of 1.4 are available: JAXP (javax.xml), SAX (org.xml.sax.*), W3C DOM (org.w3c.dom.*), and org.apache.xpath (distributed with Apache Xalan).

Some of the jars are optional:

If all above is done, run Ant from the root directory of the distribution, and it will create the new freemarker.jar in the lib directory.

Maybe you should check the new jar file against our test suite. This is done by running Ant with test target (go to the root directory of the distribution, and issue "ant test"). Note that you need Jython here, since the test suite contains Jython related tests. If the test fails, read the resulting .txt file in the build/testcase directory for more details.


Page generated: 2004-06-15 22:17:59 GMT FreeMarker Manual -- For FreeMarker 2.3