blob: d4268ad4e1b774354a608843ff1694a32873788b [file] [log] [blame]
<?xml version="1.0" encoding="iso-8859-1"?>
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
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
<project name="FreeMarker Site" default="site" basedir="."
<!-- Ivy project coordinates: -->
<property name="moduleOrg" value="org.freemarker" />
<property name="moduleName" value="site" />
<property name="moduleBranch" value="1.0" />
<!-- Will be overidden on the server: -->
<property name="server.ivy.repo.root" value="${basedir}/build/dummy-server-ivy-repo" />
<target name="init">
<condition property="deps.available">
<available file=".ivy" />
<antcall target="_autoget-deps" />
<format property="timeStamp" pattern="yyyy-MM-dd HH:mm:ss z" timezone="GMT" />
<target name="site">
<!-- Ensure that we have an empty build/site directory: -->
<mkdir dir="build/site"/>
<delete includeEmptyDirs="true">
<fileset dir="build/site">
<include name="*/**"/>
<!-- Generate the new content: -->
<ivy:cachepath pathid="ivy.dep" />
<taskdef resource="org/freemarker/docgen/"
srcdir="src/main/docgen" destdir="build/site"
<!-- Copy project meta-data file: -->
<copy file="doap.rdf" todir="build/site" />
<target name="clean">
<delete dir="build"/>
<!-- ================================================================== -->
<!-- Dependency management (keep it exactly identical for all projects) -->
<!-- ================================================================== -->
<target name="_autoget-deps" unless="deps.available">
<antcall target="update-deps" />
<target name="update-deps"
description="Gets the latest version of the dependencies from the Web"
<echo>Getting dependencies...</echo>
<ivy:settings id="remote" url="" />
<!-- Build an own repository that will serve us even offline: -->
<ivy:retrieve settingsRef="remote" sync="true"
<echo>*** Successfully acquired dependencies from the Web ***</echo>
<echo>Eclipse users: Now right-click on ivy.xml and Resolve! </echo>
<!-- Only now that we got all the dependencies will we delete anything. -->
<!-- Thus a net or repo outage doesn't left us without the dependencies. -->
<!-- Save the resolution cache from the soon coming <delete>: -->
<move todir=".ivy.part/update-deps-reso-cache">
<fileset dir=".ivy/update-deps-reso-cache" />
<!-- Drop all the old stuff: -->
<delete dir=".ivy" />
<!-- And use the new stuff instead: -->
<move todir=".ivy">
<fileset dir=".ivy.part" />
<!-- Do NOT call this from 'clean'; offline guys would stuck after that. -->
<target name="clean-deps"
description="Deletes all dependencies"
<delete dir=".ivy" />
<target name="report-deps"
description="Creates a HTML document that summarizes the dependencies."
<mkdir dir="build/deps-report" />
<ivy:resolve />
<ivy:report todir="build/deps-report" />