2002-03-03 17:25:28 -05:00
|
|
|
<!-- =================================================================== -->
|
|
|
|
<!-- 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>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- =================================================================== -->
|
|
|
|
<!-- Set a variable if the generated docs are already up-to-date. -->
|
|
|
|
<!-- =================================================================== -->
|
|
|
|
<target name="docs_check" depends="init">
|
|
|
|
<uptodate property="docs.notrequired" targetfile="${build.docs}/index.html" >
|
|
|
|
<srcfiles dir="." includes="project-info.xml"/>
|
|
|
|
<srcfiles dir="${context.dir}/xdocs" includes="**/*.xml"/>
|
|
|
|
</uptodate>
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<!-- =================================================================== -->
|
|
|
|
<!-- If generated docs is already up-to-date, print a message saying so. -->
|
|
|
|
<!-- =================================================================== -->
|
|
|
|
<target name="docs_done" if="docs.notrequired">
|
|
|
|
<echo message="-------------------------------------------------------------"/>
|
|
|
|
<echo message="Not rebuilding docs, as they are up-to-date:"/>
|
|
|
|
<echo message=" ${build.docs}/index.html is more recent than"/>
|
|
|
|
<echo message=" project-info.xml and ${context.dir}/xdocs/*.xml"/>
|
|
|
|
<echo message="-------------------------------------------------------------"/>
|
|
|
|
</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="docs"
|
|
|
|
depends="package, prepare-docs, docs_check, making-docs, docs_done"
|
|
|
|
unless="docs.notrequired"
|
|
|
|
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/docs ."/>
|
|
|
|
<echo message="-------------------------------------------------------------"/>
|
|
|
|
|
|
|
|
</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"
|
2002-03-19 04:22:47 -05:00
|
|
|
description="Generates the web site">
|
2002-03-03 17:25:28 -05:00
|
|
|
</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 © ${year} ${fullname} project. All Rights Reserved."
|
|
|
|
stylesheetfile="${resource.dir}/javadoc.css">
|
|
|
|
<classpath refid="classpath"/>
|
|
|
|
</javadoc>
|
|
|
|
</target>
|