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>
|
|
|
|
|
|
|
|
<!-- =================================================================== -->
|
2002-03-25 07:17:16 -05:00
|
|
|
<!-- Clean generated docs dir. -->
|
2002-03-03 17:25:28 -05:00
|
|
|
<!-- =================================================================== -->
|
2002-03-25 07:17:16 -05:00
|
|
|
<target name="cleandocs" depends="init" description="* Cleans the build docs directories">
|
|
|
|
<delete dir="${build.docs}"/>
|
2002-03-03 17:25:28 -05:00
|
|
|
</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 -->
|
|
|
|
<!-- =================================================================== -->
|
2002-03-25 09:07:48 -05:00
|
|
|
<target name="owdocs"
|
|
|
|
depends="prepare-docs, making-docs"
|
2002-03-03 17:25:28 -05:00
|
|
|
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>
|
|
|
|
|
2002-03-25 07:17:16 -05:00
|
|
|
<echo message=" ...docs generated succesfully in ./build/${name}/docs ."/>
|
2002-03-03 17:25:28 -05:00
|
|
|
<echo message="-------------------------------------------------------------"/>
|
|
|
|
|
|
|
|
</target>
|
|
|
|
|
2002-03-25 09:07:48 -05:00
|
|
|
<!-- =================================================================== -->
|
|
|
|
<!-- The documentation system -->
|
|
|
|
<!-- =================================================================== -->
|
|
|
|
<target name="docs"
|
|
|
|
depends="cleandocs, owdocs"
|
|
|
|
description="Cleans docs and generates the documentation">
|
|
|
|
|
|
|
|
</target>
|
|
|
|
|
2002-03-03 17:25:28 -05:00
|
|
|
<!-- =================================================================== -->
|
|
|
|
<!-- 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>
|