/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ =============================================================================== Apache FreeMarker {version} For the latest version or to report bugs visit: http://freemarker.org/ =============================================================================== DISCLAIMER Apache FreeMarker is an effort undergoing incubation at The Apache Software Foundation (ASF). Incubation is required of all newly accepted projects until a further review indicates that the infrastructure, communications, and decision making process have stabilized in a manner consistent with other successful ASF projects. While incubation status is not necessarily a reflection of the completeness or stability of the code, it does indicate that the project has yet to be fully endorsed by the ASF. What is Apache FreeMarker? -------------------------- FreeMarker is a "template engine"; a generic tool to generate text output (anything from HTML to auto generated source code) based on templates. It's a Java package, a class library for Java programmers. It's not an application for end-users in itself, but something that programmers can embed into their products. FreeMarker is designed to be practical for the generation of HTML Web pages, particularly by servlet-based applications following the MVC (Model View Controller) pattern. Licensing --------- FreeMarker is licensed under the Apache License, Version 2.0. See the LICENSE file for more details! Documentation ------------- Online: http://freemarker.org/docs/ Offline: The full documentation is available in the binary distribution in the documentation/index.html directory. Installing ---------- If you are using Maven, just add this dependency: <!-- Attention: Be sure nothing pulls in an old dependency with groupId "freemarker" (without the "org."), because then you will end up with two freemarker.jar-s and unpredictable behavior on runtime! --> <dependency> <groupId>org.freemarker</groupId> <artifactId>freemarker</artifactId> <version>{version}</version> </dependency> Otherwise simply copy freemarker.jar to a location where your Java application's ClassLoader will find it. For example, if you are using FreeMarker in a web application, you probably want to put freemarker.jar into the WEB-INF/lib directory of your web application. FreeMarker has no required dependencies. It has several optional dependencies, but usually you don't have to deal with them, because if you are using an optional feature that's certainly because your application already uses the related library. Change log ---------- Online (for stable releases only): http://freemarker.org/docs/app_versions.html Offline: In the binary release, open documentation/index.html, and you will find the link. Building -------- First of all, if you haven't yet, download the source release, or check out FreeMarker from the source code repository. You need JDK 8(!), Apache Ant and Ivy to be installed. (As of this writing it was tested with Ant 1.8.1 and Ivy 2.3.0.) If you need to ensure compliance with certain J2SE versions, copy build.properties.sample into build.properties, and edit it accordingly. To build freemarker.jar, just issue "ant" in the project root directory, and it should download all dependencies automatically and build freemarker.jar. If later you change the dependencies in ivy.xml, or otherwise want to re-download some of them, it will not happen automatically anymore. You have to issue "ant update-deps" for that. Eclipse and other IDE-s ----------------------- Run "ant ide-dependencies"; This will create an "ide-dependencies" library that contains all the jars that you have to add to the classpath in the IDE. Note that here we assume that you have run the build or at least "ant update-deps" earlier. Known issue with workaround: An old org.jaxen is included in dom4j-*.jar, which conflicts with jaxen-*.jar. If dom4j wins, your IDE will show some errors in the XML related parts. To fix that, always add dom4j-*.jar last. You could also use IvyDE instead, with configuration "IDE", but as the dependencies hardly ever change, it might not worth the trouble.