poi/tools/centipede/targets/docs.xtarget

170 lines
7.2 KiB
Plaintext

<!-- =================================================================== -->
<!-- Prepares the docs -->
<!-- =================================================================== -->
<target name="prepare-docs" depends="init">
<mkdir dir="${build.context}"/>
<mkdir dir="${build.context}/images"/>
<mkdir dir="${build.docs}"/>
<mkdir dir="${build.dir}/work"/>
<!-- make filtered copy of XML docs -->
<copy todir="${build.context}" filtering="on">
<fileset dir="${context.dir}">
<exclude name="images/**"/>
</fileset>
</copy>
<!-- Copy images -->
<copy todir="${build.context}/images" filtering="off">
<fileset dir="${context.dir}/images"/>
</copy>
<!-- Copy entity catalog and entities -->
<copy todir="${build.context}/resources/entities" filtering="on">
<fileset dir="${resource.dir}/entities"/>
</copy>
<mkdir dir="${build.context}/WEB-INF/classes"/>
<move todir="${build.context}/WEB-INF/classes">
<fileset dir="${build.context}/resources/entities">
<include name="CatalogManager.properties"/>
</fileset>
</move>
<!-- Copy Cocoon configuration (cocoon.xconf) -->
<copy todir="${build.context}" filtering="off">
<fileset dir="${tools.dir}/cocoon/conf"/>
</copy>
</target>
<!-- =================================================================== -->
<!-- Clean generated docs dir. -->
<!-- =================================================================== -->
<target name="cleandocs" depends="init" description="* Cleans the build docs directories">
<delete dir="${build.docs}"/>
</target>
<!-- =================================================================== -->
<!-- If generated docs is already up-to-date, print a message saying so. -->
<!-- =================================================================== -->
<target name="making-docs">
<echo message="-------------------------------------------------------------"/>
<echo message=" Building docs, please stand by ..."/>
</target>
<!-- =================================================================== -->
<!-- The documentation system -->
<!-- =================================================================== -->
<target name="owdocs"
depends="prepare-docs, making-docs"
description="* Generates the documentation">
<java classname="org.apache.cocoon.Main" fork="true" dir="${build.context}" failonerror="true">
<arg value="-c."/>
<arg value="-d../docs"/>
<arg value="-w../work"/>
<arg value="-l../work/cocoon.log"/>
<arg value="-uWARN"/>
<arg value="index.html"/>
<classpath>
<path refid="classpath"/>
<fileset dir="${build.dir}">
<include name="*.jar"/>
</fileset>
<fileset dir="${tools.dir}">
<include name="*/lib/*.jar"/>
</fileset>
<pathelement location="${tools.jar}"/>
<pathelement location="${build.context}/WEB-INF/classes"/>
</classpath>
</java>
<echo message=" ...docs generated succesfully in ./build/${name}/docs ."/>
<echo message="-------------------------------------------------------------"/>
</target>
<!-- =================================================================== -->
<!-- The documentation system -->
<!-- =================================================================== -->
<target name="docs"
depends="cleandocs, owdocs"
description="Cleans docs and generates the documentation">
</target>
<!-- =================================================================== -->
<!-- Create the announcements -->
<!-- =================================================================== -->
<target name="announcement" depends="prepare" description="* Creates the announcement for new releases">
<copy file="${project-info}" tofile="${build.project-info}" filtering="on"/>
<style basedir="./" destdir="./" style="${projectinfo2announcement}"
includes="project-info.xml" extension=".txt"/>
</target>
<!-- =================================================================== -->
<!-- Create the text version of projectinfo -->
<!-- =================================================================== -->
<target name="projectinfo" depends="prepare" description="* Creates the text version of projectinfo">
<copy file="${project-info}" tofile="${build.project-info}" filtering="on"/>
<style basedir="./" destdir="./" style="${project-info2txt}"
includes="project-info.xml" extension=".txt"/>
</target>
<!-- =================================================================== -->
<!-- Creates the web site -->
<!-- =================================================================== -->
<target name="site" depends="docs, javadocs"
description="Generates the web site">
</target>
<!-- =================================================================== -->
<!-- Set a variable if javadoc is already up-to-date. -->
<!-- =================================================================== -->
<target name="javadocs_check">
<uptodate property="javadocs.notrequired" targetfile="${build.javadocs}/packages.html" >
<srcfiles dir= "${build.src}" includes="**/*.java"/>
</uptodate>
</target>
<!-- =================================================================== -->
<!-- If javadoc is already up-to-date, print a message saying so. -->
<!-- =================================================================== -->
<target name="javadocs_done" if="javadocs.notrequired">
<echo message="-------------------------------------------------------------"/>
<echo message="Not rebuilding Javadocs, as they are up-to-date:"/>
<echo message=" ${build.javadocs}/packages.html is more recent than"/>
<echo message=" ${build.src}/**/*.java"/>
<echo message="-------------------------------------------------------------"/>
</target>
<!-- =================================================================== -->
<!-- Creates the API documentation -->
<!-- =================================================================== -->
<target name="javadocs" depends="prepare-src, javadocs_check, javadocs_done"
unless="javadocs.notrequired"
description="* Generates the API documentation">
<mkdir dir="${build.javadocs}"/>
<javadoc packagenames="${packages}"
sourcepath="${build.src}"
destdir="${build.javadocs}"
author="true"
version="true"
use="false"
noindex="true"
windowtitle="${Name} API"
doctitle="${Name}"
bottom="Copyright &#169; ${year} ${fullname} project. All Rights Reserved."
stylesheetfile="${resource.dir}/javadoc.css">
<classpath refid="classpath"/>
</javadoc>
</target>