2005-01-10 08:37:07 +00:00
|
|
|
<?xml version="1.0"?>
|
|
|
|
<!--
|
2006-09-01 20:17:02 +00:00
|
|
|
Licensed to the Apache Software Foundation (ASF) under one or more
|
2006-09-01 20:04:18 +00:00
|
|
|
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
|
2005-01-10 08:37:07 +00:00
|
|
|
|
|
|
|
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.
|
|
|
|
-->
|
2001-08-07 13:53:20 +00:00
|
|
|
<project name="build-site" default="docs" basedir=".">
|
|
|
|
|
2005-01-02 18:34:39 +00:00
|
|
|
<description>
|
|
|
|
Build documentation - XDocs and Javadoc.
|
|
|
|
For building XDocs, edit xdocs/**/*.xml first.
|
|
|
|
If ../jakarta-site2 does not exist, set -Dsite.dir=... for it,
|
|
|
|
or just use -Dvelocity.dir=.../velocity-4.x if you have downloaded Velocity somewhere.
|
|
|
|
|
|
|
|
XXX for no apparent reason, your CWD must be the main Ant source dir, or this will fail:
|
|
|
|
.../docs.xml:64: org.apache.velocity.exception.ResourceNotFoundException: Unable to find resource './site.vsl'
|
|
|
|
</description>
|
|
|
|
|
2001-08-07 13:53:20 +00:00
|
|
|
<!-- Initialization properties -->
|
|
|
|
<property name="project.name" value="ant"/>
|
|
|
|
<property name="docs.src" location="xdocs"/>
|
|
|
|
<property name="docs.dest" location="docs"/>
|
|
|
|
<property name="project.file" value="stylesheets/project.xml" />
|
|
|
|
<property name="templ.path" location="xdocs/stylesheets" />
|
|
|
|
<property name="velocity.props" location="${docs.src}/velocity.properties" />
|
2003-04-14 19:27:07 +00:00
|
|
|
<property name="include.xml" value="**/*.xml" />
|
2001-08-07 13:53:20 +00:00
|
|
|
|
2005-01-02 18:34:39 +00:00
|
|
|
<target name="setup-explicit-classpath" if="velocity.dir">
|
|
|
|
<path id="anakia.classpath">
|
|
|
|
<fileset dir="${velocity.dir}">
|
|
|
|
<include name="velocity-dep-*.jar"/>
|
|
|
|
<!-- XXX why is this needed separately? -->
|
|
|
|
<include name="build/lib/jdom-*.jar"/>
|
|
|
|
</fileset>
|
|
|
|
</path>
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<target name="setup-implicit-classpath" unless="velocity.dir">
|
|
|
|
<property name="site.dir" location="../jakarta-site2"/>
|
|
|
|
<path id="anakia.classpath">
|
|
|
|
<fileset dir="${site.dir}/lib">
|
|
|
|
<include name="*.jar"/>
|
|
|
|
</fileset>
|
|
|
|
</path>
|
|
|
|
</target>
|
2001-08-07 13:53:20 +00:00
|
|
|
|
2005-01-02 18:34:39 +00:00
|
|
|
<target name="prepare" depends="setup-explicit-classpath,setup-implicit-classpath">
|
2003-07-06 09:03:18 +00:00
|
|
|
<available classname="org.apache.velocity.anakia.AnakiaTask"
|
2001-08-07 13:53:20 +00:00
|
|
|
property="AnakiaTask.present">
|
|
|
|
<classpath refid="anakia.classpath"/>
|
|
|
|
</available>
|
2005-09-07 08:22:32 +00:00
|
|
|
<condition property="onwindows">
|
|
|
|
<os family="windows"/>
|
|
|
|
</condition>
|
2001-08-07 13:53:20 +00:00
|
|
|
</target>
|
|
|
|
|
|
|
|
<target depends="prepare" name="prepare-error" unless="AnakiaTask.present">
|
|
|
|
<echo>
|
2003-07-06 09:03:18 +00:00
|
|
|
AnakiaTask is not present! Please check to make sure that
|
2001-08-07 13:53:20 +00:00
|
|
|
velocity.jar is in your classpath.
|
|
|
|
</echo>
|
|
|
|
</target>
|
|
|
|
|
2005-09-07 08:22:32 +00:00
|
|
|
<target name="anakia" if="AnakiaTask.present" depends="prepare-error">
|
2001-10-29 09:16:27 +00:00
|
|
|
<taskdef name="anakia" classname="org.apache.velocity.anakia.AnakiaTask">
|
2001-08-07 13:53:20 +00:00
|
|
|
<classpath refid="anakia.classpath"/>
|
|
|
|
</taskdef>
|
2003-07-06 09:03:18 +00:00
|
|
|
|
2001-08-07 13:53:20 +00:00
|
|
|
<anakia basedir="${docs.src}" destdir="${docs.dest}/"
|
|
|
|
extension=".html" style="./site.vsl"
|
|
|
|
projectFile="${project.file}"
|
2003-01-24 08:55:06 +00:00
|
|
|
excludes="**/stylesheets/**"
|
2003-04-14 19:27:07 +00:00
|
|
|
includes="${include.xml}"
|
2001-08-07 13:53:20 +00:00
|
|
|
lastModifiedCheck="true"
|
|
|
|
templatePath="${templ.path}"
|
|
|
|
velocityPropertiesFile="${velocity.props}">
|
|
|
|
</anakia>
|
2005-10-14 18:44:49 +00:00
|
|
|
<fixcrlf srcdir="${docs.dest}" includes="**/*.html"/>
|
2001-08-07 13:53:20 +00:00
|
|
|
</target>
|
2003-07-06 09:03:18 +00:00
|
|
|
|
2005-09-07 08:22:32 +00:00
|
|
|
<target name="fixcrlf" if="onwindows">
|
|
|
|
<fixcrlf srcDir="${docs.dest}" eol="dos" includes="*.html"/>
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<target name="docs" if="AnakiaTask.present" depends="anakia,fixcrlf" description="Create XDocs.">
|
|
|
|
</target>
|
2005-01-02 18:34:39 +00:00
|
|
|
<target name="javadocs" description="Create Javadoc.">
|
2001-08-07 13:53:20 +00:00
|
|
|
<ant antfile="build.xml" target="dist_javadocs">
|
|
|
|
<property name="dist.javadocs" value="${docs.dest}/manual/api" />
|
|
|
|
</ant>
|
|
|
|
</target>
|
2003-07-06 09:03:18 +00:00
|
|
|
|
2005-01-02 18:34:39 +00:00
|
|
|
<target name="all" depends="docs,javadocs" description="Create both XDocs and Javadoc."/>
|
|
|
|
|
2001-08-07 13:53:20 +00:00
|
|
|
</project>
|