krysalis-jplugin build.xml,1.1.1.1,1.2

[email protected] Fri, 18 Apr 2003 01:31:00 -0700
Newsgroups gmane.comp.krysalis.sandbox
Message-ID <[email protected]>
Update of /cvsroot/metamorphosis/krysalis-jplugin
In directory sc8-pr-cvs1:/tmp/cvs-serv13742

Modified Files:
	build.xml 
Log Message:
New simple and faster build, all in one file.

Index: build.xml
===================================================================
RCS file: /cvsroot/metamorphosis/krysalis-jplugin/build.xml,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** build.xml	15 Apr 2003 21:09:30 -0000	1.1.1.1
--- build.xml	18 Apr 2003 08:30:57 -0000	1.2
***************
*** 1,173 ****
  <?xml version="1.0"?> 
- <!DOCTYPE project [
- <!ENTITY preinit-target SYSTEM "./tools/targets/preinit.xtarget"> 
- <!ENTITY init-target SYSTEM "./tools/targets/init.xtarget"> 
- <!ENTITY compile-target SYSTEM "./tools/targets/compile.xtarget"> 
- <!ENTITY run-target SYSTEM "./tools/targets/run.xtarget"> 
- <!ENTITY interactive-target SYSTEM "./tools/targets/interactive.xtarget"> 
- <!ENTITY scratchpad-target SYSTEM "./tools/targets/scratchpad.xtarget"> 
- <!ENTITY contrib-target SYSTEM "./tools/targets/contrib.xtarget"> 
- <!ENTITY util-target SYSTEM "./tools/targets/util.xtarget"> 
- <!ENTITY dev-target SYSTEM "./tools/targets/dev.xtarget"> 
- <!ENTITY test-target SYSTEM "./tools/targets/test.xtarget"> 
- <!ENTITY robot-target SYSTEM "./tools/targets/robot.xtarget"> 
- <!ENTITY docs-target SYSTEM "./tools/targets/docs.xtarget"> 
- ]>
  
! <project default="interactive" basedir="." name="krysalis">
  
! <!-- ===========================================================================
  
  
!                    * ===================================== *
!                    |   Krysalis Centipede Build System      |
!                    * ===================================== *      
!                                      by               
!                                              
!                    Nicola Ken Barozzi <[email protected]>
! 	  Marc Johnson <mjohnson at apache dot org>       
!                      
!                    extends the Apache Cocoon Build System 
!                        (http://xml.apache.org/cocoon/)
!                                      by
!                    Stefano Mazzocchi <[email protected]>
!                    Carsten Ziegeler <[email protected]>
!                    
  
- Installing the build tools
- ==========================
  
! The Krysalis build system is based on Apache Ant, which is a Java building tool
! originally developed for the Tomcat project but now used in many other
! Apache projects and extended by many developers.
  
! Ant is a little but very handy tool that uses a build file written in XML
! (this file) as building instructions. For more information refer to
! "http://jakarta.apache.org/ant/".
  
! To make things easier for you, this distribution contains a precompiled
! version of Ant and the build scripts take care of running it.
  
! The only thing that you have to make sure, is the "JAVA_HOME" environment
! property should be set to match the JVM you want to use.
  
! That's all you have to do to be ready to go.
  
  
! Building instructions
! =====================
  
! First, make sure your current working directory is where this very file 
! is located. Then type
  
!   ./build.sh (unix)
!   .\build.bat (win32)
  
! if everything is right and all the required packages are visible, this action
! will start the build and prompt you with options.
! Note, that if you do further development, compilation time is reduced since
! Ant is able of detecting which files have changed and to recompile them at need.
  
! Also, you'll note that reusing a single JVM instance for each task, increases
! tremendously the performance of the whole build system, compared to other
! tools (i.e. make or shell scripts) where a new JVM is started for each task.
  
  
! Building on another directory
! =============================
  
! Sometimes you might want to build on an external directory to keep the
! distribution clean: no worries, this is just an environment property away.
! Suppose you want to use the "../build" directory instead, you simply tipe
  
!  [unix]  ./build.sh  -Dbuild.root=../build
!  [win32] .\build.bat -Dbuild.root=..\build
  
! By using the -Dxxx=yyy argument, you are setting environments in the JVM: Ant
! is designed to give higher priority to system environments to allow you to
! modify _any_ <property> that you can find in the building instructions below,
! so it's just a matter of understanding what property you want to change
! and you don't have to touch this file (which you shouldn't need to do).
  
  
! Build targets
! =============
  
! The build system is not only responsible of compiling the project into a jar 
! file, but is also responsible for creating the HTML documentation, javadocs,
! distributions and web site. In fact, the file you have here is _exactly_ what
! is used by project maintainers to take care of everything in the project,
! no less and no more.
  
! To know more about the available targets take a look at this file, which is
! pretty self-explanatory.
! To see al list of all targets, type
  
!  [unix]  ./build.sh  -projecthelp
!  [win32] .\build.bat -projecthelp
  
  
! Build Dependencies
! ==================
! Some components are optional and require special jar files to be compiled
! and added to the application. Some of these jars are already included
! in the distribution while others not.
! For each optional package which is not available, a warning can be
! printed. If you don't like these warnings, specify the property "omit.opt.warnings"
! (build -Domit.opt.warnings).
  
! Distribution Version
! ====================
! When preparing a distribution for release, specify the version ID on
! the command line: -Dversion="dev-1.2.1", for example.
  
! Specifying a subset of unit tests to be executed
! ================================================
! Specify the package on the command line:
! -Dtest.specific="org.krysalis.p.testme" will select only the testme
! tests to be run. If you've run any other unit tests in a prior
! session, you'll need to specify the 'clean' target to remove
! extraneous test classes from execution:
  
! ./build.sh clean test -Dtest.specific="org/krysalis/p/testme"
  
! or
  
! .\build.bat clean test -Dtest.specific="org/krysalis/p/testme"
  
  
!                               Happy hacking from the Dev Team :)
  
! ============================================================================ -->
  
-  
    <!-- =================================================================== -->
!   <!-- external reference are relative to to tools/targets/*.xtarget       -->
    <!-- =================================================================== -->
!   <!-- Pre Initialization      -->  &preinit-target;  
!   <!-- =================================================================== -->  
!   <!-- Initialization targets  -->  &init-target;  
    <!-- =================================================================== -->
!   <!-- Compile targets         -->  &compile-target;  
!   <!-- =================================================================== -->  
!   <!-- Compile targets         -->  &run-target;  
!   <!-- =================================================================== -->  
!   <!-- Interactive targets     -->  &interactive-target;  
    <!-- =================================================================== -->
!   <!-- Scratchpad targets      -->  &scratchpad-target;
    <!-- =================================================================== -->
!   <!-- Contrib targets         -->  &contrib-target;
    <!-- =================================================================== -->
!   <!-- Utility  targets        -->  &util-target;  
    <!-- =================================================================== -->
!   <!-- Developer targets       -->  &dev-target;  
    <!-- =================================================================== -->
!   <!-- Testcases targets       -->  &test-target;
    <!-- =================================================================== -->
!   <!-- "Scripts" targets       -->  &robot-target;
    <!-- =================================================================== -->
!   <!-- Documentation targets   -->  &docs-target;  
    <!-- =================================================================== -->
    
  </project>
  
--- 1,710 ----
  <?xml version="1.0"?> 
  
! <project default="package" basedir="." name="krysalis">
!  
!   <!--
!     Give user a chance to override without editing this file
!     (and without typing -D each time he compiles it)
!   -->
!   <property file=".ant.properties"/>
!   <property file="${user.home}/.ant.properties"/>
  
!   <!--
!     these are here only for those who use jikes compiler. For other
!     developers this part makes no difference.
!   -->
!   <property name="build.compiler.emacs" value="on"/>
!   <!-- property name="build.compiler.warnings" value="true"/ -->
!   <property name="build.compiler.pedantic" value="false"/>
!   <property name="build.compiler.depend" value="true"/>
!   <property name="build.compiler.fulldepend" value="true"/>
  
+   <!-- =================================================================== -->
+   <!-- Project names                                                 -->
+   <!-- =================================================================== -->
  
!    <property name="fullname" value="KRYSALIS JPLUGIN"/>
!    <property name="name"     value="krysalis-jplugin"/>
!    <property name="Name"     value="Krysalis JPlugin"/>
!    <property name="packages" value="org.krysalis.jplugin.*"/>      
  
  
!   <!-- =================================================================== -->
!   <!-- Indentify Classpath                                                 -->
!   <!-- =================================================================== -->
!   <path id="classpath">
!     <fileset dir="./lib/core">
!       <include name="*.jar"/>
!     </fileset>
!     <fileset dir="./lib/optional">
!       <include name="*.jar"/>
!     </fileset>
!   </path>
!   
  
!   <!-- =================================================================== -->
!   <!-- Run program                                           -->
!   <!-- =================================================================== -->
!   <target name="run"
!           depends="compile"
!           description="Runs the program">
  
!     <java classname="org.krysalis.jplugin.engine.Boot" fork="true" dir="${src.dir}" failonerror="true">
!       <classpath>
!         <path refid="classpath"/>
!         <fileset dir="${build.dir}">
!           <include name="*.jar"/>
!         </fileset>
!         <fileset dir="${tools.lib.dir}">
!           <include name="*.jar"/>
!         </fileset>        
!         <pathelement location="${tools.jar}"/>
!         <pathelement location="${build.dest}"/>
!       </classpath>
!     </java>
  
!   </target>
  
!   <!-- =================================================================== -->
!   <!-- Test targets                                                       -->
!   <!-- =================================================================== -->
!   <target name="test" depends="compile" description="Perform jUnit tests">
!     <mkdir dir="${build.test}"/>
!     <!-- Copy test files to build test dir -->
!     <copy todir="${build.test}" filtering="on">
!       <fileset dir="${test.dir}/${test.specific}"/>
!     </copy>
!     <!-- Compile tests -->
!     <javac srcdir="${build.test}"
!             destdir="${build.test}"
!             debug="${debug}"
!             optimize="${optimize}"
!             deprecation="${deprecation}"
!             target="${target.vm}">
!       <classpath refid="classpath"/>
!       <classpath>
!         <pathelement path="${build.dest}" />
!       </classpath>
!     </javac>
!     <junit printsummary="yes" haltonfailure="yes" fork="yes">
!       <classpath>
!         <pathelement location="${build.test}" />
!         <pathelement location="${build.dest}" />
!         <pathelement path="${java.class.path}" />
!       </classpath>
!       <classpath refid="classpath"/>
!       <formatter type="plain" usefile="no" />
!       <batchtest>
!         <fileset dir="${build.test}">
!           <include name="**/test/*TestCase.class"/>
!           <include name="**/*Test.class" />
!           <include name="**/Test*.class" />
!           <exclude name="**/AllTest.class" />
!           <exclude name="**/*$$*Test.class" />
!         </fileset>
!       </batchtest>
!     </junit>
!   </target>
  
+  <!-- =================================================================== -->
+   <!-- Prepares the build directory                                        -->
+   <!-- =================================================================== -->
+   <target name="prepare" depends="init">
+     <mkdir dir="${build.dir}"/>
+   </target>
  
!   <!-- =================================================================== -->
!   <!-- Prepares the source code                                            -->
!   <!-- =================================================================== -->
!   <target name="prepare-src" depends="prepare">
!     <mkdir dir="${build.src}"/>
!     <mkdir dir="${build.dest}"/>
!   </target>
  
!   <!-- =================================================================== -->
!   <!-- Compiles the source directory                                       -->
!   <!-- =================================================================== -->
!   <target name="compile" depends="prepare-src"
!           description="Compiles the source code">
  
!     <echo message="Compiling with Java ${ant.java.version}, debug ${debug}, optimize ${optimize}, deprecation ${deprecation}"/>
  
!     <javac srcdir="${build.src}"
!            destdir="${build.dest}"
!            debug="${debug}"
!            optimize="${optimize}"
!            deprecation="${deprecation}"
!            target="${target.vm}"
!            nowarn="${nowarn}">
!       <classpath refid="classpath"/>
!     </javac>
!   
!   </target>
  
!   <!-- =================================================================== -->
!   <!-- Creates the jar file                                                -->
!   <!-- =================================================================== -->
!   <target name="all" depends="package" description="Default target"/>
  
+   <target name="package" depends="compile" description="Generates the jar package">
+     <jar jarfile="${build.dir}/${name}.jar">
+       <fileset dir="${build.dest}">
+         <include name="**"/>
+         <include name="META-INF/**"/>
+       </fileset>
+     </jar>
+     
+   </target>
+   
+   <!-- =================================================================== -->
+   <!-- Copies the tools.jar to javac.jar in web-inf/lib                    -->
+   <!-- =================================================================== -->
+   <target name="prepare-tools-lib" depends="package" if="tools.jar.present">
+     <!-- NOTE: java.home is normally set by the JVM to the /jre directory -->
+     <copy file="${tools.jar}" tofile="${build.war}/WEB-INF/lib/javac.jar"/>
+   </target>
  
!   <!-- =================================================================== -->
!   <!-- Clean targets                                                       -->
!   <!-- =================================================================== -->
!   <target name="clean" depends="init" description="* Cleans the build directories">
!     <delete dir="${build.dir}"/>
!   </target>
  
!   <target name="cleandocs" depends="init" description="* Cleans the build docs directories">
!     <delete dir="${build.docs}"/>
!   </target>
  
!   <target name="distclean" depends="clean" description="* Cleans everything to the original state">
!     <delete dir="${build.root}"/>
!     <delete file="${dist.target}/${Name}-${version}.tar.gz"/>
!     <delete file="${dist.target}/${Name}-${version}.tar"/>
!     <delete file="${dist.target}/${Name}-${version}.zip"/>
!     <delete file="${dist.target}/${Name}-${version}-src.tar.gz"/>
!     <delete file="${dist.target}/${Name}-${version}-src.tar"/>
!     <delete file="${dist.target}/${Name}-${version}-src.zip"/>
!     <delete file="${dist.target}/${Name}-${version}-bin.tar.gz"/>
!     <delete file="${dist.target}/${Name}-${version}-bin.tar"/>
!     <delete file="${dist.target}/${Name}-${version}-bin.zip"/>
!     <delete dir="${dist.root}"/>
!   </target>
!   <!-- =================================================================== -->
!   <!-- Creates the source distribution                                     -->
!   <!-- =================================================================== -->
!   <target name="dist-src" depends="docs, javadocs" 
!           description="Prepares the source distribution">
!     <!-- Simply copy all and add the html docs -->
!     <mkdir dir="${dist.root}"/>
!     <mkdir dir="${dist.src.dir}"/>
!     <mkdir dir="${dist.src.dir}/lib"/>
!     <mkdir dir="${dist.src.dir}/src"/>
!     <mkdir dir="${dist.src.dir}/src/java"/>
!     <mkdir dir="${dist.src.dir}/src/documentation"/>
!     <mkdir dir="${dist.src.dir}/src/resources"/>
!     <mkdir dir="${dist.src.dir}/src/testcases"/>
!     <mkdir dir="${dist.src.dir}/docs"/>
!     <mkdir dir="${dist.src.dir}/docs/apidocs"/>
!     <mkdir dir="${dist.src.dir}/tools"/>
  
!     <!--
!     <copy todir="${dist.src.dir}/bin">
!       <fileset dir="${bin.dir}"/>
!     </copy> -->
!     <copy todir="${dist.src.dir}/tools">
!       <fileset dir="${tools.dir}"/>
!     </copy>
  
+     <copy todir="${dist.src.dir}/src/documentation">
+       <fileset dir="${build.context}"/>
+     </copy>
  
!     <copy todir="${dist.src.dir}/lib">
!       <fileset dir="${lib.dir}"/>
!     </copy>
  
!     <copy todir="${dist.src.dir}/src/resources" filtering="on">
!       <fileset dir="${resource.dir}">
!         <exclude name="**/*.gif"/>
!         <exclude name="**/*.jpg"/>
!         <exclude name="**/*.png"/>
!      </fileset>
!     </copy>
  
!     <copy todir="${dist.src.dir}/src/resources" filtering="off">
!       <fileset dir="${resource.dir}">
!         <include name="**/*.gif"/>
!         <include name="**/*.jpg"/>
!         <include name="**/*.png"/>
!      </fileset>
!     </copy>
  
!     <copy todir="${dist.src.dir}/src/java" filtering="on">
!       <fileset dir="${java.dir}"/>
!     </copy>
  
+     <copy todir="${dist.src.dir}/src/testcases" filtering="off">
+       <fileset dir="${test.dir}"/>
+     </copy>
+         
+     <copy todir="${dist.src.dir}/docs">
+       <fileset dir="${build.docs}"/>
+     </copy>
+     <copy todir="${dist.src.dir}/docs/apidocs">
+       <fileset dir="${build.javadocs}"/>
+     </copy>
  
!     <copy todir="${dist.src.dir}">
!       <fileset dir="${docs.dir}">
!         <include name="changes.xml, todo.xml"/>
!       </fileset>
!     </copy>
  
!     <copy todir="${dist.src.dir}" filtering="on">
!      <fileset dir=".">
!       <include name="README.txt"/>
!       <include name="legal/*"/>
!       <include name="*.bat"/>
!       <include name="*.sh"/>
!       <include name="*.xml"/>
!      </fileset>
!     </copy>
  
!     <chmod perm="+x" file="${dist.src.dir}/build.sh"/>
!     <chmod perm="+x" file="${dist.src.dir}/tools/bin/antRun"/>
!     <fixcrlf srcdir="${dist.src.dir}" includes="**.sh"        eol="lf"/>
!     <fixcrlf srcdir="${dist.src.dir}" includes="antRun"       eol="lf"/>
!     <fixcrlf srcdir="${dist.src.dir}" includes="**.bat"      eol="crlf"/>
!   </target>
  
!   <!-- =================================================================== -->
!   <!-- Packages the source distribution as .zip                            -->
!   <!-- =================================================================== -->
!   <target name="dist-src-zip" depends="dist-src" 
!           description="Generates the source distribution as a .zip file">
!     <zip zipfile="${dist.target}/${dist.name}-src.zip"
!          basedir="${dist.root}/source"/>
!   </target>
  
!   <!-- =================================================================== -->
!   <!-- Packages the source distribution with .tar.gzip                     -->
!   <!-- =================================================================== -->
!   <target name="dist-src-tgz" depends="dist-src" 
!           description="Generates the source distribution as a .tar.gz file">
!     <tar tarfile="${dist.target}/${dist.name}-src.tar"
!          basedir="${dist.root}/source"
!          longfile="gnu"/>
!     <gzip zipfile="${dist.target}/${dist.name}-src.tar.gz"
!           src="${dist.target}/${dist.name}-src.tar"/>
!   </target>
  
!   <!-- =================================================================== -->
!   <!-- Creates the binary distribution                                     -->
!   <!-- =================================================================== -->
!   <target name="dist-bin" depends="package, docs, javadocs" 
!           description="Prepares the binary distribution">
!     <!-- Copy the html docs -->
!     <mkdir dir="${dist.root}"/>
!     <mkdir dir="${dist.bin.dir}"/>
!     <mkdir dir="${dist.bin.dir}/lib"/>
!     <mkdir dir="${dist.bin.dir}/docs"/>
!     <mkdir dir="${dist.bin.dir}/docs/apidocs"/>
  
+     <copy file="${build.dir}/${name}.jar" tofile="${dist.bin.dir}/lib/${name}-${version}.jar"/>
+     
+     <copy todir="${dist.bin.dir}/docs">
+       <fileset dir="${build.docs}"/>
+     </copy>
+     <copy todir="${dist.bin.dir}/docs/apidocs">
+       <fileset dir="${build.javadocs}"/>
+     </copy>
  
!     <copy todir="${dist.bin.dir}">
!       <fileset dir="${docs.dir}">
!         <include name="changes.xml, todo.xml"/>
!       </fileset>
!     </copy>
  
!     <copy todir="${dist.bin.dir}" filtering="on">
!      <fileset dir=".">
!       <include name="README.txt"/>
!       <include name="legal/*"/>
!      </fileset>
!     </copy>
! 
!   </target>
  
    <!-- =================================================================== -->
!   <!-- Packages the binary distribution as .zip                            -->
    <!-- =================================================================== -->
!   <target name="dist-bin-zip" depends="dist-bin" 
!           description="Generates the binary distribution as a .zip file">
!     <zip zipfile="${dist.target}/${dist.name}-bin.zip"
!          basedir="${dist.root}/bin"/>
!   </target>
! 
    <!-- =================================================================== -->
!   <!-- Packages the binary distribution with .tar.gzip                     -->
    <!-- =================================================================== -->
!   <target name="dist-bin-tgz" depends="dist-bin" 
!           description="Generates the binary distribution as a .tar.gz file">
!     <tar tarfile="${dist.target}/${dist.name}-bin.tar"
!          basedir="${dist.root}/bin"
!          longfile="gnu"/>
!     <gzip zipfile="${dist.target}/${dist.name}-bin.tar.gz"
!           src="${dist.target}/${dist.name}-bin.tar"/>
!   </target>
! 
! 
    <!-- =================================================================== -->
!   <!-- Build all distributions                                             -->
    <!-- =================================================================== -->
!   <target name="dist"
!           depends="dist-info, dist-bin-tgz, dist-bin-zip, dist-src-tgz, dist-src-zip"
!           description="* Generates all distributions (source/binary)">
!   </target>
!   
    <!-- =================================================================== -->
!   <!-- Build all distributions                                             -->
    <!-- =================================================================== -->
!   <target name="dist-info" depends="init">
!     <echo>**********************************************</echo>
!     <echo>*</echo>
!     <echo>*  Build all distributions:</echo> 
!     <echo>*  - source distribution for windows/unix.</echo>
!     <echo>*  - binary distribution for windows/unix.</echo>
!     <echo>*</echo>        
!     <echo>*  This may take a while...</echo>        
!     <echo>*</echo>        
!     <echo>***********************************************</echo>
!     <echo/>
!   </target>
!   
    <!-- =================================================================== -->
!   <!-- Fix line endings in src                                             -->
    <!-- =================================================================== -->
!   <target name="fixsrclf" depends="init" description="Fix lf in src directory (internal use only!)">
!           <fixcrlf srcdir="${java.dir}" includes="**/*.java"       eol="lf"/>
!   </target>
!   
!     <!-- =================================================================== -->
!   <!-- 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>
+ 
+   </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="changes.xml,todo.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="  todo.xml, changes.xml, ${context.dir}/xdocs/*.xml"/>
+     <echo message="-------------------------------------------------------------"/>
+   </target>
+ 
+   <!-- =================================================================== -->
+   <!-- The documentation system                                            -->
+   <!-- =================================================================== -->
+   <target name="docs"
+           depends="package, prepare-docs, docs_check, 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="-uINFO"/>
+       <arg value="index.html"/>
+       <classpath>
+         <path refid="classpath"/>
+         <fileset dir="${build.dir}">
+           <include name="*.jar"/>
+         </fileset>
+         <fileset dir="${tools.lib.dir}">
+           <include name="*.jar"/>
+         </fileset>        
+         <pathelement location="${tools.jar}"/>
+         <pathelement location="${build.context}/WEB-INF/classes"/>
+       </classpath>
+     </java>
+ 
+   </target>
    
+   <!-- =================================================================== -->
+   <!-- Set a variable if the generated printer docs are already up-to-date. -->
+   <!-- =================================================================== -->
+   <target name="printer-docs_check" depends="init">
+     <uptodate property="printer-docs.notrequired" targetfile="${build.docs.printer}/index.html" >
+       <srcfiles dir="." includes="changes.xml,todo.xml"/>
+       <srcfiles dir="${docs.dir}" includes="**/*.xml"/>
+     </uptodate>
+   </target>
+ 
+   <!-- =================================================================== -->
+   <!-- If generated printer docs is already up-to-date, print a message saying so. -->
+   <!-- =================================================================== -->
+   <target name="printer-docs_done" if="printer-docs.notrequired">
+     <echo message="-------------------------------------------------------------"/>
+     <echo message="Not rebuilding printer docs, as they are up-to-date:"/>
+     <echo message="  ${build.docs.printer}/index.html is more recent than"/>
+     <echo message="  todo.xml, changes.xml, ${docs.dir}/*.xml"/>
+     <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>
+   <!-- =================================================================== -->
+   <!-- Prepares the printer-docs                                           -->
+   <!-- =================================================================== -->
+   <target name="prepare-printer-docs" depends="prepare-docs">
+ 
+     <mkdir dir="${build.dir}/printer_documentation"/>
+ 
+     <!-- copy prepared docs -->
+     <copy todir="${build.dir}/printer_documentation" filtering="off">
+       <fileset dir="${build.context}">
+       </fileset>
+     </copy>
+ 
+     <!-- copy printer skin -->
+     <copy todir="${build.dir}/printer_documentation/stylesheets" filtering="off" overwrite="yes">
+       <fileset dir="${build.context}/stylesheets/printer_skin">
+       </fileset>
+     </copy>
+ 
+   </target>
+ 
+ 
+   <!-- =================================================================== -->
+   <!-- Generate printer-friendly HTML docs                                 -->
+   <!-- =================================================================== -->
+   <target name="printer-docs" depends="package, prepare-printer-docs, printer-docs_check, printer-docs_done"
+       unless="printer-docs.notrequired"
+       description="* Generates printer-friendly documentation">
+     <mkdir dir="${build.docs.printer}"/>
+ 
+     <java classname="org.apache.cocoon.Main" fork="true" dir="${build.dir}/printer_documentation" failonerror="true">
+       <arg value="-c."/>
+       <arg value="-d../printer-docs"/>
+       <arg value="-w../work-printer"/>
+       <arg value="-l../work-printer/cocoon.log"/>
+       <arg value="-uINFO"/>
+       <arg value="index.html"/>
+       <classpath>
+         <path refid="classpath"/>
+         <fileset dir="${build.dir}">
+           <include name="*.jar"/>
+         </fileset>
+         <pathelement location="${tools.jar}"/>
+         <pathelement location="${build.context}/WEB-INF/classes"/>
+       </classpath>
+     </java>
+   </target>
+ 
+   <!-- =================================================================== -->
+   <!-- Creates the web site                                                -->
+   <!-- =================================================================== -->
+   <target name="site" depends="docs, javadocs"
+       description="Generates the web site (for site maintainers only)">
+     <mkdir dir="${site}"/>
+     <copy todir="${site}" filtering="off">
+       <fileset dir="${build.docs}">
+       </fileset>
+     </copy>
+     <copy todir="${site}/apidocs" filtering="off">
+       <fileset dir="${build.javadocs}"/>
+     </copy>
+   </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>
+ 
+   <!-- =================================================================== -->
+   <!-- Initialization target                                               -->
+   <!-- =================================================================== -->
+   <target name="init">
+     <tstamp/>
+ 
+     <property name="version"  value="1.0"/>
+     <property name="short.version" value="1.0"/>
+     <property name="year"     value="2002"/>
+ 
+     <echo message="--------------------------------------------------------------"/>    
+     <echo message="                      ${fullname} [${year}]                   "/>   
+     <echo message="--------------------------------------------------------------"/>    
+     <echo message="Building with ${ant.version}"/>  
+     <echo message="using build file ${ant.file}"/>  
+     <echo message="--------------------------------------------------------------"/>         
+ 
+     <property name="debug"          value="on"/>
+     <property name="optimize"       value="off"/>
+     <property name="deprecation"    value="off"/>
+     <property name="nowarn"         value="on"/>
+     <property name="build.compiler" value="modern"/>
+     <property name="target.vm"      value="1.2"/>
+ 
+     <property name="src.dir"       value="./src"/>
+     <property name="java.dir"      value="${src.dir}/java"/>
+     <property name="test.dir"      value="${src.dir}/testcases"/>
+     <property name="test.specific" value=""/>
+     <property name="lib.dir"       value="./lib"/>
+     <property name="bin.dir"       value="./bin"/>
+     <property name="tools.dir"     value="./tools"/>
+     <property name="tools.lib.dir" value="${tools.dir}/lib"/>    
+     <property name="docs.dir"      value="${src.dir}/documentation/xdocs"/>
+     <property name="images.dir"    value="${src.dir}/documentation/images"/>
+     <property name="resource.dir"  value="${src.dir}/resources"/>
+     <property name="context.dir"   value="${src.dir}/documentation"/>
+ 
+    
+     <property name="build.root"     value="./build"/>
+     <property name="build.dir"      value="${build.root}/${name}"/>
+     <property name="build.src"      value="${src.dir}"/>
+     <property name="build.test"      value="${build.dir}/testcases"/>
+     <property name="build.dest"     value="${build.dir}/classes"/>
+     <property name="build.docs"     value="${build.dir}/docs"/>
+     <property name="build.xdocs"    value="${build.dir}/xdocs"/>
+     <property name="build.docs.printer" value="${build.dir}/printer-docs"/>
+     <property name="build.javadocs" value="${build.dir}/javadocs"/>
+     <property name="build.context" value="${build.dir}/documentation"/>
+     
+     <property name="dist.root"   value="./dist"/>
+     <property name="dist.name" value="${name}-${version}"/>
+     <property name="dist.dir"    value="${dist.root}/${dist.name}"/>
+     <property name="dist.src.dir"    value="${dist.root}/source/${dist.name}"/>
+     <property name="dist.bin.dir"    value="${dist.root}/bin/${dist.name}"/>
+     <property name="dist.target" value="${dist.root}"/>
+ 
+     <property name="site" value="../xml-site/targets/${name}"/>
+ 
+     <property name="project-info" value="./project-info.xml"/>
+     <property name="build.project-info" value="${build.dir}/project-info.xml"/>
+     <property name="project-info2txt" value="${src.dir}/documentation/stylesheets/projectinfo2txt.xsl"/>
+     <property name="projectinfo2announcement" value="${src.dir}/documentation/stylesheets/projectinfo2announcement.xsl"/>
+     <property name="projectinfo2todo" value="${src.dir}/documentation/stylesheets/projectinfo2todo.xsl"/>
+ 
+     <!--
+     The location of tools.jar, relative to the JAVA_HOME home.
+     -->
+     <property name="tools.jar" value="${java.home}/../lib/tools.jar"/>
+     <available file="${tools.jar}" property="tools.jar.present"/>
+ 
+     <filter token="Name"    value="${fullname}"/>
+     <filter token="name"    value="${fullname}"/>
+     <filter token="year"    value="${year}"/>
+     <filter token="version" value="${version}"/>
+     <filter token="date"    value="${TODAY}"/>
+     <filter token="log"     value="true"/>
+     <filter token="verbose" value="true"/>
+ 
+     <!-- compile the ant tasks -->
+     <mkdir dir="${tools.dir}/anttasks"/>
+     <javac srcdir="${tools.dir}/src" destdir="${tools.dir}/anttasks"/>
+ 
+   </target>
+   
+  
  </project>
  




-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf