Show documentation.xml syntax highlighted
<?xml version="1.0"?>
<project name="forrestdocgeneration" default="default" basedir=".">
<!--
/** (C) Copyright 1998-2004 Hewlett-Packard Development Company, LP
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
For more information: www.smartfrog.org
*/
-->
<description>
This build file runs forrest
</description>
<!-- =================================================================== -->
<!-- Generate Forrest Documentation -->
<!-- =================================================================== -->
<property environment="env" />
<property name="is.component" value="true" />
<!--fail unless="${env.FORREST_HOME}">
FORREST_HOME is not defined.
To create the documentation, you need Forrest 1.5.x on your system, and
the environment variable FORREST_HOME set up to point to it.
</fail-->
<property name="root.dir" location=".." />
<!-- Import common stuff -->
<import file="${root.dir}/common.xml"/>
<property name="forrest.home" location="${env.FORREST_HOME}"/>
<import file="${env.FORREST_HOME}/main/forrest.build.xml"/>
<import file="${env.FORREST_HOME}/main/forrest.antproxy.xml"/>
<target name="init" depends="init-common" >
<echo level="verbose">Created forrest project template</echo>
<property name="comp.home" location="${smartfrog.components.dir}"/>
<property name="xdocs.skin.dir" location="${comp.home}/src/documentation/content/xdocs"/>
<property name="xdocs.dir" location="${comp.home}/src/documentation/content/xdocs/smartfrogdoc"/>
<property name="skin.dir" location="forrest_skin" />
<macrodef name="forrest-component">
<attribute name="component" description="component to copy"/>
<attribute name="includes" default="**/*" description="inclusion pattern; defaults to **/*"/>
<sequential>
<!--dest dir -->
<mkdir dir="${xdocs.dir}/@{component}"/>
<!-- copy the docs -->
<copy todir="${xdocs.dir}/@{component}">
<fileset dir="@{component}/doc">
<include name="@{includes}" />
</fileset>
<!-- skin -->
<fileset dir="${skin.dir}">
<include name="@{component}.xml" />
</fileset>
</copy>
</sequential>
</macrodef>
</target>
<target name="copy-properties" depends="init">
<copy todir="${comp.home}" overwrite="true" file="${skin.dir}/forrest.properties" />
</target>
<target name="seedforrest" depends="seed" description="Creates forrest project template">
<echo>Created forrest project template</echo>
</target>
<target name="prepare-docs" depends="seedforrest,copy-properties">
<mkdir dir="${xdocs.dir}"/>
<copy todir="${xdocs.dir}">
<fileset dir="${skin.dir}">
<include name="SFComponents.xml" />
<include name="overview_html_39c627ce.gif" />
</fileset>
</copy>
<copy todir="${xdocs.skin.dir}" overwrite="true">
<fileset dir="${skin.dir}">
<include name="index.xml" />
<include name="site.xml" />
<include name="tabs.xml" />
</fileset>
</copy>
<forrest-component component="emailer" />
<forrest-component component="net" />
<forrest-component component="ssh" />
<forrest-component component="scripting" />
<forrest-component component="slp" />
<forrest-component component="anubis" />
<forrest-component component="loggingservices" />
<!--forrest-component component="anubisdeployer" /-->
<forrest-component component="sfinstaller" />
<forrest-component component="ant" />
<forrest-component component="jetty" />
<forrest-component component="www" />
<!--forrest-component component="xml" /-->
<copy todir="${comp.home}/src/documentation" overwrite="true"
file="${skin.dir}/skinconf.xml">
</copy>
<copy todir="${xdocs.skin.dir}/images">
<fileset dir="${skin.dir}">
<include name="sf.*" />
<include name="frog.*" />
<include name="sourceforge.*" />
</fileset>
</copy>
<echo level="verbose" >${comp.home}</echo>
</target>
<target name="generate-site" depends="prepare-docs" >
<!--antcall target="site"/-->
<exec dir="${comp.home}" executable="${env.FORREST_HOME}/bin/forrest.bat" os="Windows 2000, Windows_NT, Windows XP, Windows Vista, Windows NT (unknown)">
<arg value="site"/>
<arg value="-Dforrest.jvmargs\=true"/>
<arg value="-Djava.awt.headless\=true"/>
</exec>
<exec dir="${comp.home}" executable="${env.FORREST_HOME}/bin/forrest" os="Linux">
<arg value="-Dforrest.jvmargs=-Djava.awt.headless=true"/>
<arg value="site"/>
</exec>
</target>
<target name="copy-forrest-docs" depends="generate-site" >
<copy todir="${dist.doc.dir}">
<fileset dir="${comp.home}/build/site">
<include name="**/*.*" />
<exclude name="samples/*.*"/>
<exclude name="test1.html"/>
<exclude name="test2.html"/>
<exclude name="hello.pdf"/>
<exclude name="linkmap.*"/>
</fileset>
</copy>
<copy todir="${dist.doc.dir}/smartfrogdoc/">
<fileset dir="${skin.dir}">
<include name="overview_html_39c627ce.gif" />
</fileset>
</copy>
</target>
<target name="docs" depends="copy-forrest-docs" description="Document Generation">
</target>
<target name="default" depends="docs" description="Document Generation">
</target>
</project>
See more files for this project here