You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@forrest.apache.org by st...@apache.org on 2002/07/26 12:26:13 UTC

cvs commit: xml-forrest/src/resources/forrestbot/xslt config2work.xsl

stevenn     2002/07/26 03:26:13

  Modified:    .        build.xml forrestbot.conf.xml
               src/resources/forrestbot/ant templates.build.xml
               src/resources/forrestbot/xslt config2work.xsl
  Log:
  applying forrestbot patches (wip) for mpo@outerthought.org
  
  Revision  Changes    Path
  1.17      +633 -631  xml-forrest/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/xml-forrest/build.xml,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- build.xml	25 Jul 2002 18:25:11 -0000	1.16
  +++ build.xml	26 Jul 2002 10:26:12 -0000	1.17
  @@ -1,631 +1,633 @@
  -<?xml version="1.0"?>
  -<?xml-stylesheet type="text/xsl" href="./tools/antipede/resources/stylesheets/build.xsl"?>
  -
  -<!--<!DOCTYPE project SYSTEM "./tools/antipede/build.dtd" >-->
  -<!DOCTYPE project [
  -  <!-- antipede -->
  -  <!ENTITY import-antipede  SYSTEM "./tools/antipede/build.xtarget">
  -
  -]>
  -<project default="interactive" basedir="." name="project build file">
  -
  -<description>
  -                   * ===================================== *
  -                   |   Krysalis Centipede Build System     |
  -                   * ===================================== *
  -                                     by
  -
  -                   Nicola Ken Barozzi (nicolaken@apache.org)
  -                   Marc Johnson (mjohnson@apache.org)
  -
  -
  -                   For a simple interactive build, simply
  -                   run the build script (build.bat or build.sh)
  -</description>
  -
  -  <path id="classpath">
  -    <fileset dir="./lib/endorsed">
  -      <include name="*.jar"/>
  -    </fileset>
  -    <fileset dir="./lib/core">
  -      <include name="*.jar"/>
  -    </fileset>
  -    <fileset dir="./lib/optional">
  -      <include name="*.jar"/>
  -    </fileset>
  -  </path>
  -
  -
  -  <!-- =================================================================== -->
  -  <!-- Targets for this project                                            -->
  -  <!-- =================================================================== -->
  -
  -  <target name="init" depends="-init">
  -    <property name="name"                  value="${xgump.module.project.name}"/>
  -    <property name="packages"              value="${xgump.module.project.packages}"/>
  -
  -    <property name="build.root"            value="${xlayout.build.dir}"/>
  -    <property name="build.dir"             value="${xlayout.build.dir}"/>
  -    <property name="resource.dir"          value="${xlayout.source.resources.dir}"/>
  -    <property name="context.dir"           value="${xlayout.source.documentation.dir}"/>
  -    <property name="build.docs"            value="${xlayout.build.documentation.dir}"/>
  -    <property name="build.javadocs"        value="${xlayout.build.documentation.javadocs.dir}"/>
  -    <property name="build.context"         value="${xlayout.build.work.dir}"/>
  -    <property name="build.dest"            value="${xlayout.build.classes.dir}"/>
  -    <property name="build.scratchpad.dest" value="${xlayout.build.scratchpad.classes.dir}"/>
  -
  -    <property name="tools.dir"             value="./tools"/>
  -    <property name="tools.jar"             value="${java.home}/../lib/tools.jar"/>
  -    <available file="${tools.jar}"         property="tools.jar.present"/>
  -
  -  </target>
  -
  -
  -
  -  <target name="run" depends="init">
  -
  -    <antcall target="runforrestrun">
  -      <param name="getcvsmodule.package"      value="jakarta-poi"/>
  -      <param name="getcvsmodule.work.dir"     value="${build.dir}/work/forrest/cvsmodule" />
  -      <param name="documentation.source.dir"  value="${build.dir}/work/forrest/cvsmodule/jakarta-poi/src/documentation"/>
  -      <param name="deploy.username"           value="forrestbot"/>
  -      <param name="deploy.package-name"       value="jakarta-poi"/>
  -      <param name="deploy.data.dir"           value="${build.dir}/docs"/>
  -      <param name="deploy.hostname"           value="krysalis.sourceforge.net"/>
  -      <param name="deploy.remotedir"          value="/home/groups/k/kr/krysalis/htdocs/poi"/>
  -    </antcall>
  -
  -  </target>
  -
  -  <target name="runforrestrun" depends="getcvsmodule, prepare-docs, owdocs, deploy"/>
  -
  -  <target name="updateforrestsite" depends="init, docs, deployforrestsite, sendlog"/>
  -
  -  <target name="deployforrestsite" depends="init, docs">
  -    <antcall target="deploy">
  -      <param name="deploy.username"     value="forrestbot"/>
  -      <param name="deploy.package-name" value="xml-forrest"/>
  -      <param name="deploy.data.dir"     value="${build.dir}/docs"/>
  -      <param name="deploy.hostname"     value="krysalis.sourceforge.net"/>
  -      <param name="deploy.remotedir"    value="/home/groups/k/kr/krysalis/htdocs/forrest"/>
  -    </antcall>
  -  </target>
  -
  -  <!-- =================================================================== -->
  -  <!-- Interactive build                                                   -->
  -  <!-- =================================================================== -->
  -  <target name="interactive" description="Interactive Build" depends="-init">
  -    <echo>
  -    --------------------------------------------------------------
  -
  -          ${xgump.module.project.name} ${xgump.module.project.version.major}.${xgump.module.project.version.minor}   [${YEAR}]
  -
  -    --------------------------------------------------------------
  -     Using ${ant.version}
  -     Build file ${ant.file}
  -    --------------------------------------------------------------
  -     These are the most common build targets.
  -     You can also invoke them directly; see build.xml for more info.
  -     Builds will be in /build directory, distributions in /dist.
  -
  -     forrest-typical targets:
  -
  -     docs ------------- generates static Forrest website
  -     webapp ----------- builds webapp (.war) deployable version of Forrest website
  -     bot.run ---------- runs the forrestbot using the configuration specified in
  -                        forrestbot.conf.xml
  -
  -     default centipede targets:
  -
  -     compile ---------- compiles the source code
  -     test ------------- performs the jUnit tests
  -     jar -------------- create the jar files
  -     docs ------------- generates the html docs - clean not needed
  -     javadocs --------- generates the API documentation
  -     site ------------- generates the html site (docs+reports)
  -     clean ------------ cleans the build directory
  -     dist ------------- creates src and bin distributions
  -     scratchpad ------- build-run scratchpad code
  -     contrib ---------- build-run contributed code
  -
  -
  -    </echo>
  -    <property name="input.selection" value="docs"/>
  -    <centipede-user-input name="input.selection">Please select a target </centipede-user-input>
  -
  -    <antcall target="call-cent">
  -      <param name="cent-name"   value="centipede"/>
  -      <param name="cent-target" value="splash"/>
  -    </antcall>
  -
  -    <antcall target="${input.selection}"/>
  -
  -  </target>
  -
  -
  -  <!-- ================================== -->
  -  <!--              Compile               -->
  -  <!-- ================================== -->
  -
  -  <target  name="compile"   depends="-init"
  -           description="Compile java source code">
  -
  -    <antcall target="call-cent">
  -      <param name="cent-name"   value="centipede"/>
  -      <param name="cent-target" value="compile"/>
  -    </antcall>
  -
  -  </target>
  -
  -  <!-- ================================== -->
  -  <!--              jar                   -->
  -  <!-- ================================== -->
  -
  -  <target  name="jar"   depends="-init"
  -           description="Make jars">
  -
  -    <antcall target="call-cent">
  -      <param name="cent-name"   value="centipede"/>
  -      <param name="cent-target" value="package"/>
  -    </antcall>
  -
  -  </target>
  -
  -  <!-- ================================== -->
  -  <!--              Scratchpad               -->
  -  <!-- ================================== -->
  -
  -  <target  name="scratchpad"   depends="-init"
  -           description="Execute scratchpad targets">
  -
  -    <ant antfile="${xlayout.source.scratchpad.targets.dir}/scratchpad.xml"/>
  -
  -  </target>
  -
  -  <!-- ================== -->
  -  <!-- Prepares the docs  -->
  -  <!-- ================== -->
  -  <target name="prepare-docs" depends="init, compile">
  -
  -    <property name="centipede.tools.cents.forrest.loglevel" value="ERROR"/>
  -    <property name="use.skin" value="bert"/>
  -
  -    <property name="documentation.context.dir"  value="${resource.dir}"/>
  -    <property name="documentation.source.dir"   value="${context.dir}"/>
  -
  -    <echo>Running docs generation from: ${documentation.source.dir}.</echo>
  -
  -    <!-- define filters -->
  -    <filter token="skin"              value="${use.skin}"/>
  -    <filter token="link1"             value="apache"/>
  -    <filter token="link1.href"        value="http://www.apache.org/"/>
  -    <filter token="link2"             value="xml.apache"/>
  -    <filter token="link2.href"        value="http://xml.apache.org/"/>
  -    <!-- the breadcrumb script already generates it, so it needs to be kept blank -->
  -    <filter token="link3"             value=""/>
  -    <filter token="link3.href"        value=""/>
  -    <filter token="group-logo.src"    value="images/group-logo.gif"/>
  -    <filter token="group-logo.href"   value="http://xml.apache.org/"/>
  -    <filter token="group-logo.alt"    value="Apache XML logo"/>
  -    <filter token="project-logo.src"  value="images/project-logo.gif"/>
  -    <filter token="project-logo.href" value="http://xml.apache.org/forrest/"/>
  -    <filter token="project-logo.alt"  value="Forrest logo"/>
  -    <filter token="year" value="2002"/>
  -    <filter token="vendor" value="Apache Sofware Foundation"/>
  -
  -
  -    <mkdir dir="${build.context}"/>
  -    <mkdir dir="${build.docs}"/>
  -    <mkdir dir="${build.dir}/work"/>
  -
  -
  -    <!-- make filtered copy of XML docs -->
  -    <copy todir="${build.context}" filtering="on" overwrite="true">
  -      <fileset dir="${documentation.source.dir}" casesensitive="no">
  -        <include name="**/*.x*"/>
  -      </fileset>
  -    </copy>
  -
  -    <!-- make non filtered copy of images -->
  -    <copy todir="${build.context}" filtering="off">
  -      <fileset dir="${documentation.source.dir}" casesensitive="no">
  -        <exclude name="**/*.x*"/>
  -      </fileset>
  -    </copy>
  -
  -    <!-- Copy entity catalog, entities and class files -->
  -    <copy todir="${build.context}/resources/schema" filtering="on">
  -      <fileset dir="${resource.dir}/schema"/>
  -    </copy>
  -    <mkdir dir="${build.context}/WEB-INF/classes"/>
  -    <copy todir="${build.context}/WEB-INF/classes">
  -      <fileset dir="${build.context}/resources/schema">
  -        <include name="CatalogManager.properties"/>
  -      </fileset>
  -      <fileset dir="${build.dest}">
  -        <include name="**/*.class"/>
  -      </fileset>
  -      <fileset dir="${build.scratchpad.dest}">
  -        <include name="**/*.class"/>
  -      </fileset>
  -    </copy>
  -
  -    <!-- Copy Cocoon configuration and sitemap -->
  -    <copy todir="${build.context}" filtering="on">
  -      <fileset dir="${documentation.context.dir}/conf">
  -        <include name="sitemap.xmap"/>
  -        <include name="cocoon.xconf"/>
  -        <include name="logkit.xconf"/>
  -      </fileset>
  -    </copy>
  -    <copy todir="${build.context}/WEB-INF/" filtering="on">
  -      <fileset dir="${documentation.context.dir}/conf">
  -        <exclude name="sitemap.xmap"/>
  -      </fileset>
  -    </copy>
  -
  -    <!-- Copy libraries -->
  -    <copy todir="${build.context}/library/" filtering="on">
  -      <fileset dir="${documentation.context.dir}/library">
  -
  -      </fileset>
  -    </copy>
  -
  -    <!-- Copy skins -->
  -    <copy todir="${build.context}/skins/" filtering="on">
  -      <fileset dir="${documentation.context.dir}/skins">
  -        <exclude name="**/images/**"/>
  -      </fileset>
  -    </copy>
  -    <copy todir="${build.context}/skins/" filtering="off">
  -      <fileset dir="${documentation.context.dir}/skins">
  -        <include name="**/images/**"/>
  -      </fileset>
  -    </copy>
  -
  -    <!-- Copy the project descriptors -->
  -    <copy todir="${build.context}" filtering="on">
  -      <fileset dir=".">
  -        <include name="*.*ml"/>
  -      </fileset>
  -    </copy>
  -
  -  </target>
  -
  -  <!-- =================================================================== -->
  -  <!-- Prepares the docs to create a .war                                  -->
  -  <!-- =================================================================== -->
  -  <target name="webapp" depends="init, prepare-docs">
  -    <delete file="${build.context}/cocoon.xconf"/>
  -    <war warfile="${build.dir}/${name}.war"
  -         webxml="${build.context}/WEB-INF/web.xml"
  -         compress="true">
  -
  -      <fileset dir="${build.context}">
  -        <exclude name="WEB-INF/web.xml"/>
  -      </fileset>
  -      <lib dir="lib/endorsed"/>
  -      <lib dir="lib/core"/>
  -      <lib dir="lib/optional"/>
  -      <lib dir="src/scratchpad/lib"/>
  -      <classes dir="${build.context}/WEB-INF/classes/"/>
  -
  -    </war>
  -
  -  </target>
  -
  -  <target name="cleandocs" depends="init" description="* Cleans the build docs directories">
  -    <delete dir="${build.docs}"/>
  -  </target>
  -
  -  <!-- =================================================================== -->
  -  <!-- Creates the API documentation                                       -->
  -  <!-- =================================================================== -->
  -  <target name="javadocs"
  -      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>
  -
  -  <!-- =================================================================== -->
  -  <!-- Validate xml                                                        -->
  -  <!-- =================================================================== -->
  -  <target name="validate-docs" description="Checks that the xml files are valid and conform to the DTD.">
  -    <xmlvalidate failonerror="yes" lenient="yes" warn="yes"
  -       className="org.apache.xerces.parsers.SAXParser">
  -
  -       <classpath>
  -         <fileset dir="./lib/endorsed">
  -           <include name="*.jar"/>
  -         </fileset>
  -       </classpath>
  -
  -       <fileset dir="."
  -                includes="*.x*" excludes="build.xml"/>
  -
  -     </xmlvalidate>
  -  </target>
  -
  -  <!-- =================================================================== -->
  -  <!-- The documentation system                                            -->
  -  <!-- =================================================================== -->
  -  <target name="docs"
  -          depends="cleandocs, owdocs"
  -          description="* Generates the documentation"/>
  -
  -  <!-- =================================================================== -->
  -  <!-- The documentation system                                            -->
  -  <!-- =================================================================== -->
  -  <target name="owdocs"
  -          depends="prepare-docs"
  -          description="* Generates the documentation">
  -
  -    <property name="dir.containing.docs" value="${build.context}"/>
  -
  -    <echo message="-------------------------------------------------------------"/>
  -    <echo message="  Building docs, please stand by ..."/>
  -
  -    <java classname="org.apache.cocoon.Main" fork="true" dir="${dir.containing.docs}" failonerror="true">
  -      <arg value="-c."/>
  -      <arg value="-d../docs"/>
  -      <arg value="-w../work"/>
  -      <arg value="-b../brokenlinks.txt"/>
  -      <arg value="-k../work/logkit.xconf"/>
  -      <arg value="-u${centipede.tools.cents.forrest.loglevel}"/>
  -      <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 successfully in ${build.docs}"/>
  -    <echo message="-------------------------------------------------------------"/>
  -
  -  </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>
  -
  -
  -  <target name="getcvsmodule" depends="init">
  -
  -    <property name="getcvsmodule.work.dir" value="${build.dir}/work/forrest/cvsmodule" />
  -    <property name="getcvsmodule.package" value="xml-forrest" />
  -
  -    <delete dir="${getcvsmodule.work.dir}"/>
  -    <mkdir dir="${getcvsmodule.work.dir}"/>
  -
  -    <cvspass cvsroot=":pserver:anoncvs@jakarta.apache.org:/home/cvspublic"
  -            password="anoncvs"
  -     />
  -
  -    <cvs cvsRoot=":pserver:anoncvs@cvs.apache.org:/home/cvspublic"
  -         package="${getcvsmodule.package}"
  -         dest="${getcvsmodule.work.dir}"
  -         quiet="true"
  -    />
  -  </target>
  -
  -  <target name="deploy" unless="deploy.username, deploy.package-name
  -                                    deploy.data.dir, deploy.hostname, deploy.remotedir">
  -  <!--
  -    deploy.username
  -    deploy.package-name
  -    deploy.data.dir
  -    deploy.hostname
  -    deploy.remotedir
  -   -->
  -
  -    <property name="deploy.work.dir"  value="${build.dir}/work/forrest/deploy/${deploy.package-name}"/>
  -
  -    <delete dir="${deploy.work.dir}"/>
  -    <mkdir dir="${deploy.work.dir}"/>
  -
  -    <property name="deploy.tar.fullpath"
  -              value="${deploy.work.dir}/${deploy.package-name}-deploy"/>
  -
  -    <tar tarfile="${deploy.tar.fullpath}.tar" basedir="${deploy.data.dir}"/>
  -    <gzip zipfile="${deploy.tar.fullpath}.tar.gz" src="${deploy.tar.fullpath}.tar"/>
  -    <delete file="${deploy.tar.fullpath}.tar"/>
  -
  -    <exec dir="." executable="scp">
  -      <!--<arg value="-oProtocol=1"/>-->
  -      <arg value="${deploy.tar.fullpath}.tar.gz"/>
  -      <arg value="${deploy.username}@${deploy.hostname}:${deploy.remotedir}"/>
  -    </exec>
  -
  -    <exec dir="." executable="ssh">
  -      <arg line="-n ${deploy.hostname} -l ${deploy.username} 'cd ${deploy.remotedir};gunzip ${deploy.package-name}-deploy.tar.gz;tar xUvf ${deploy.package-name}-deploy.tar;chmod -R g+u *;rm ${deploy.package-name}-deploy.tar'"/>
  -    </exec>
  -
  -    <delete file="${deploy.tar.fullpath}.tar.gz"/>
  -
  -  </target>
  -
  -  <target name="sendlog" depends="init" if="sendlog.to">
  -
  -   <mail from="forrest-dev@xml.apache.org"
  -         tolist="${sendlog.to}"
  -         subject="[DO NOT REPLY] Building in the Forrest"
  -         files="forrestbot.log" />
  -
  -  </target>
  -
  -
  -  <target name="testpoi" depends="init, testpoicvs, testpoigen, testpoideploy"/>
  -
  -
  -  <target name="testpoicvs" depends="init">
  -
  -    <antcall target="getcvsmodule">
  -      <param name="getcvsmodule.package"  value="jakarta-poi"/>
  -      <param name="getcvsmodule.work.dir" value="${build.dir}/work/forrest/cvsmodule" />
  -    </antcall>
  -
  -  </target>
  -
  -  <target name="testpoigen" depends="init">
  -
  -    <antcall target="prepare-docs">
  -      <param name="documentation.source.dir"  value="${build.dir}/work/forrest/cvsmodule/jakarta-poi/src/documentation"/>
  -    </antcall>
  -
  -    <antcall target="owdocs"></antcall>
  -
  -  </target>
  -
  -  <target name="testpoideploy" depends="init">
  -
  -
  -    <antcall target="deploy">
  -      <param name="deploy.username"     value="forrestbot"/>
  -      <param name="deploy.package-name" value="jakarta-poi"/>
  -      <param name="deploy.data.dir"     value="${build.dir}/docs"/>
  -      <param name="deploy.hostname"     value="krysalis.sourceforge.net"/>
  -      <param name="deploy.remotedir"    value="/home/groups/k/kr/krysalis/htdocs/poi"/>
  -    </antcall>
  -
  -  </target>
  -
  -
  -
  -   <target name="forrestbar" depends="init">
  -
  -      <mkdir dir="${build.dir}" />
  -      <mkdir dir="${build.dir}/work/forrestbar" />
  -
  -      <jar jarfile="${build.dir}/work/forrestbar/forrestbar.jar">
  -         <fileset dir="src/resources/forrestbar" includes="content/**/*" />
  -      </jar>
  -
  -      <copy file="src/resources/forrestbar/install.js" todir="${build.dir}/work/forrestbar" overwrite="true" />
  -
  -      <zip zipfile="${build.dir}/forrestbar.xpi" basedir="${build.dir}/work/forrestbar" />
  -
  -   </target>
  -
  -
  -
  -  <!-- ================================== -->
  -  <!--        Target used by Gump         -->
  -  <!-- ================================== -->
  -
  -  <target  name="gump" description="Target used by Gump">
  -
  -      <antcall target="docs"/>
  -      <antcall target="webapp"/>
  -
  -  </target>
  -
  -  <!-- ================================== -->
  -  <!--    Targets for the remote builds   -->
  -  <!-- ================================== -->
  -
  -  <target name="bot.init" depends="init">
  -    <!-- initializes environment to start on bot targets -->
  -    <property name="bot.build.dir"              value="${xlayout.build.bot.dir}"/>
  -    <property name="bot.work.build.xml"         value="${bot.build.dir}/work.build.xml"/>
  -    <property name="bot.default.parameters.xml" value="${bot.build.dir}/default.parameters.xml"/>
  -    <property name="bot.forrestbot.xconf"       value="forrestbot.conf.xml" />
  -    <property name="bot.templates.build.xml"    value="${xlayout.source.resources.forrestbot.ant.dir}/templates.build.xml" />
  -    <property name="bot.work.builder.xslt"      value="${xlayout.source.resources.forrestbot.xslt.dir}/config2work.xsl" />
  -    <property name="bot.default.builder.xslt"   value="${xlayout.source.resources.forrestbot.xslt.dir}/config2defaults.xsl" />
  -    <mkdir dir="${bot.build.dir}" />
  -  </target>
  -
  -  <target name="bot.conf2build" depends="bot.init" >
  -    <!-- builds the different xml files this process needs.  -->
  -    <style in="${bot.forrestbot.xconf}"
  -       out="${bot.work.build.xml}"
  -       style="${bot.work.builder.xslt}"/>
  -    <style in="${bot.forrestbot.xconf}"
  -       out="${bot.default.parameters.xml}"
  -       style="${bot.default.builder.xslt}"/>
  -    <copy todir="${bot.build.dir}" file="${bot.templates.build.xml}"/>
  -  </target>
  -
  -  <target name="bot.prepare-cp" depends="bot.init, compile" >
  -    <!-- todo: question if it is good practice to share WEB-INF classes -->
  -    <mkdir dir="${bot.build.dir}/WEB-INF/classes"/>
  -    <copy todir="${bot.build.dir}/WEB-INF/classes">
  -      <fileset dir="${resource.dir}/schema">
  -        <include name="CatalogManager.properties"/>
  -      </fileset>
  -      <fileset dir="${build.dest}">
  -        <include name="**/*.class"/>
  -      </fileset>
  -      <fileset dir="${build.scratchpad.dest}">
  -        <include name="**/*.class"/>
  -      </fileset>
  -    </copy>
  -
  -    <path id="forrest.cp">
  -      <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="${bot.build.dir}/WEB-INF/classes"/>
  -    </path>
  -  </target>
  -
  -  <target name="bot.run" depends="bot.conf2build, bot.prepare-cp" >
  -    <!-- delegates to the generated XML file -->
  -    <ant antfile="${bot.work.build.xml}" target="work" inheritRefs="true"/>
  -  </target>
  -
  -  <target name="bot" depends="bot.run" />
  -
  -  <!-- =================================================================== -->
  -  <!-- Import Ant-Centipede init targets - sets up basic build stuff       -->
  -  <!-- =================================================================== -->
  -  <!--
  -        This is the target that initializes tasks and properties used
  -        commonly in every other target.
  -
  -        Remember to add depends="init" to every target, so that this
  -        target is called before any other.
  -
  -        This target is internal; to make it unusable from the commandline,
  -        its name starts with a hyphen.
  -        To make it invisible when using -projecthelp, it lacks a description.
  -  -->
  -
  -    &import-antipede;
  -
  -</project>
  +<?xml version="1.0"?>
  +<?xml-stylesheet type="text/xsl" href="./tools/antipede/resources/stylesheets/build.xsl"?>
  +
  +<!--<!DOCTYPE project SYSTEM "./tools/antipede/build.dtd" >-->
  +<!DOCTYPE project [
  +  <!-- antipede -->
  +  <!ENTITY import-antipede  SYSTEM "./tools/antipede/build.xtarget">
  +
  +]>
  +<project default="interactive" basedir="." name="project build file">
  +
  +<description>
  +                   * ===================================== *
  +                   |   Krysalis Centipede Build System     |
  +                   * ===================================== *
  +                                     by
  +
  +                   Nicola Ken Barozzi (nicolaken@apache.org)
  +                   Marc Johnson (mjohnson@apache.org)
  +
  +
  +                   For a simple interactive build, simply
  +                   run the build script (build.bat or build.sh)
  +</description>
  +
  +  <path id="classpath">
  +    <fileset dir="./lib/endorsed">
  +      <include name="*.jar"/>
  +    </fileset>
  +    <fileset dir="./lib/core">
  +      <include name="*.jar"/>
  +    </fileset>
  +    <fileset dir="./lib/optional">
  +      <include name="*.jar"/>
  +    </fileset>
  +  </path>
  +
  +
  +  <!-- =================================================================== -->
  +  <!-- Targets for this project                                            -->
  +  <!-- =================================================================== -->
  +
  +  <target name="init" depends="-init">
  +    <property name="name"                  value="${xgump.module.project.name}"/>
  +    <property name="packages"              value="${xgump.module.project.packages}"/>
  +
  +    <property name="build.root"            value="${xlayout.build.dir}"/>
  +    <property name="build.dir"             value="${xlayout.build.dir}"/>
  +    <property name="resource.dir"          value="${xlayout.source.resources.dir}"/>
  +    <property name="context.dir"           value="${xlayout.source.documentation.dir}"/>
  +    <property name="build.docs"            value="${xlayout.build.documentation.dir}"/>
  +    <property name="build.javadocs"        value="${xlayout.build.documentation.javadocs.dir}"/>
  +    <property name="build.context"         value="${xlayout.build.work.dir}"/>
  +    <property name="build.dest"            value="${xlayout.build.classes.dir}"/>
  +    <property name="build.scratchpad.dest" value="${xlayout.build.scratchpad.classes.dir}"/>
  +
  +    <property name="tools.dir"             value="./tools"/>
  +    <property name="tools.jar"             value="${java.home}/../lib/tools.jar"/>
  +    <available file="${tools.jar}"         property="tools.jar.present"/>
  +
  +  </target>
  +
  +
  +
  +  <target name="run" depends="init">
  +
  +    <antcall target="runforrestrun">
  +      <param name="getcvsmodule.package"      value="jakarta-poi"/>
  +      <param name="getcvsmodule.work.dir"     value="${build.dir}/work/forrest/cvsmodule" />
  +      <param name="documentation.source.dir"  value="${build.dir}/work/forrest/cvsmodule/jakarta-poi/src/documentation"/>
  +      <param name="deploy.username"           value="forrestbot"/>
  +      <param name="deploy.package-name"       value="jakarta-poi"/>
  +      <param name="deploy.data.dir"           value="${build.dir}/docs"/>
  +      <param name="deploy.hostname"           value="krysalis.sourceforge.net"/>
  +      <param name="deploy.remotedir"          value="/home/groups/k/kr/krysalis/htdocs/poi"/>
  +    </antcall>
  +
  +  </target>
  +
  +  <target name="runforrestrun" depends="getcvsmodule, prepare-docs, owdocs, deploy"/>
  +
  +  <target name="updateforrestsite" depends="init, docs, deployforrestsite, sendlog"/>
  +
  +  <target name="deployforrestsite" depends="init, docs">
  +    <antcall target="deploy">
  +      <param name="deploy.username"     value="forrestbot"/>
  +      <param name="deploy.package-name" value="xml-forrest"/>
  +      <param name="deploy.data.dir"     value="${build.dir}/docs"/>
  +      <param name="deploy.hostname"     value="krysalis.sourceforge.net"/>
  +      <param name="deploy.remotedir"    value="/home/groups/k/kr/krysalis/htdocs/forrest"/>
  +    </antcall>
  +  </target>
  +
  +  <!-- =================================================================== -->
  +  <!-- Interactive build                                                   -->
  +  <!-- =================================================================== -->
  +  <target name="interactive" description="Interactive Build" depends="-init">
  +    <echo>
  +    --------------------------------------------------------------
  +
  +          ${xgump.module.project.name} ${xgump.module.project.version.major}.${xgump.module.project.version.minor}   [${YEAR}]
  +
  +    --------------------------------------------------------------
  +     Using ${ant.version}
  +     Build file ${ant.file}
  +    --------------------------------------------------------------
  +     These are the most common build targets.
  +     You can also invoke them directly; see build.xml for more info.
  +     Builds will be in /build directory, distributions in /dist.
  +
  +     forrest-typical targets:
  +
  +     docs ------------- generates static Forrest website
  +     webapp ----------- builds webapp (.war) deployable version of Forrest website
  +     bot.run ---------- runs the forrestbot using the configuration specified in
  +                        forrestbot.conf.xml
  +
  +     default centipede targets:
  +
  +     compile ---------- compiles the source code
  +     test ------------- performs the jUnit tests
  +     jar -------------- create the jar files
  +     docs ------------- generates the html docs - clean not needed
  +     javadocs --------- generates the API documentation
  +     site ------------- generates the html site (docs+reports)
  +     clean ------------ cleans the build directory
  +     dist ------------- creates src and bin distributions
  +     scratchpad ------- build-run scratchpad code
  +     contrib ---------- build-run contributed code
  +
  +
  +    </echo>
  +    <property name="input.selection" value="docs"/>
  +    <centipede-user-input name="input.selection">Please select a target </centipede-user-input>
  +
  +    <antcall target="call-cent">
  +      <param name="cent-name"   value="centipede"/>
  +      <param name="cent-target" value="splash"/>
  +    </antcall>
  +
  +    <antcall target="${input.selection}"/>
  +
  +  </target>
  +
  +
  +  <!-- ================================== -->
  +  <!--              Compile               -->
  +  <!-- ================================== -->
  +
  +  <target  name="compile"   depends="-init"
  +           description="Compile java source code">
  +
  +    <antcall target="call-cent">
  +      <param name="cent-name"   value="centipede"/>
  +      <param name="cent-target" value="compile"/>
  +    </antcall>
  +
  +  </target>
  +
  +  <!-- ================================== -->
  +  <!--              jar                   -->
  +  <!-- ================================== -->
  +
  +  <target  name="jar"   depends="-init"
  +           description="Make jars">
  +
  +    <antcall target="call-cent">
  +      <param name="cent-name"   value="centipede"/>
  +      <param name="cent-target" value="package"/>
  +    </antcall>
  +
  +  </target>
  +
  +  <!-- ================================== -->
  +  <!--              Scratchpad               -->
  +  <!-- ================================== -->
  +
  +  <target  name="scratchpad"   depends="-init"
  +           description="Execute scratchpad targets">
  +
  +    <ant antfile="${xlayout.source.scratchpad.targets.dir}/scratchpad.xml"/>
  +
  +  </target>
  +
  +  <!-- ================== -->
  +  <!-- Prepares the docs  -->
  +  <!-- ================== -->
  +  <target name="prepare-docs" depends="init, compile">
  +
  +    <property name="centipede.tools.cents.forrest.loglevel" value="ERROR"/>
  +    <property name="use.skin" value="bert"/>
  +
  +    <property name="documentation.context.dir"  value="${resource.dir}"/>
  +    <property name="documentation.source.dir"   value="${context.dir}"/>
  +
  +    <echo>Running docs generation from: ${documentation.source.dir}.</echo>
  +
  +    <!-- define filters -->
  +    <filter token="skin"              value="${use.skin}"/>
  +    <filter token="link1"             value="apache"/>
  +    <filter token="link1.href"        value="http://www.apache.org/"/>
  +    <filter token="link2"             value="xml.apache"/>
  +    <filter token="link2.href"        value="http://xml.apache.org/"/>
  +    <!-- the breadcrumb script already generates it, so it needs to be kept blank -->
  +    <filter token="link3"             value=""/>
  +    <filter token="link3.href"        value=""/>
  +    <filter token="group-logo.src"    value="images/group-logo.gif"/>
  +    <filter token="group-logo.href"   value="http://xml.apache.org/"/>
  +    <filter token="group-logo.alt"    value="Apache XML logo"/>
  +    <filter token="project-logo.src"  value="images/project-logo.gif"/>
  +    <filter token="project-logo.href" value="http://xml.apache.org/forrest/"/>
  +    <filter token="project-logo.alt"  value="Forrest logo"/>
  +    <filter token="year" value="2002"/>
  +    <filter token="vendor" value="Apache Sofware Foundation"/>
  +
  +
  +    <mkdir dir="${build.context}"/>
  +    <mkdir dir="${build.docs}"/>
  +    <mkdir dir="${build.dir}/work"/>
  +
  +
  +    <!-- make filtered copy of XML docs -->
  +    <copy todir="${build.context}" filtering="on" overwrite="true">
  +      <fileset dir="${documentation.source.dir}" casesensitive="no">
  +        <include name="**/*.x*"/>
  +      </fileset>
  +    </copy>
  +
  +    <!-- make non filtered copy of images -->
  +    <copy todir="${build.context}" filtering="off">
  +      <fileset dir="${documentation.source.dir}" casesensitive="no">
  +        <exclude name="**/*.x*"/>
  +      </fileset>
  +    </copy>
  +
  +    <!-- Copy entity catalog, entities and class files -->
  +    <copy todir="${build.context}/resources/schema" filtering="on">
  +      <fileset dir="${resource.dir}/schema"/>
  +    </copy>
  +    <mkdir dir="${build.context}/WEB-INF/classes"/>
  +    <copy todir="${build.context}/WEB-INF/classes">
  +      <fileset dir="${build.context}/resources/schema">
  +        <include name="CatalogManager.properties"/>
  +      </fileset>
  +      <fileset dir="${build.dest}">
  +        <include name="**/*.class"/>
  +      </fileset>
  +      <fileset dir="${build.scratchpad.dest}">
  +        <include name="**/*.class"/>
  +      </fileset>
  +    </copy>
  +
  +    <!-- Copy Cocoon configuration and sitemap -->
  +    <copy todir="${build.context}" filtering="on">
  +      <fileset dir="${documentation.context.dir}/conf">
  +        <include name="sitemap.xmap"/>
  +        <include name="cocoon.xconf"/>
  +        <include name="logkit.xconf"/>
  +      </fileset>
  +    </copy>
  +    <copy todir="${build.context}/WEB-INF/" filtering="on">
  +      <fileset dir="${documentation.context.dir}/conf">
  +        <exclude name="sitemap.xmap"/>
  +      </fileset>
  +    </copy>
  +
  +    <!-- Copy libraries -->
  +    <copy todir="${build.context}/library/" filtering="on">
  +      <fileset dir="${documentation.context.dir}/library">
  +
  +      </fileset>
  +    </copy>
  +
  +    <!-- Copy skins -->
  +    <copy todir="${build.context}/skins/" filtering="on">
  +      <fileset dir="${documentation.context.dir}/skins">
  +        <exclude name="**/images/**"/>
  +      </fileset>
  +    </copy>
  +    <copy todir="${build.context}/skins/" filtering="off">
  +      <fileset dir="${documentation.context.dir}/skins">
  +        <include name="**/images/**"/>
  +      </fileset>
  +    </copy>
  +
  +    <!-- Copy the project descriptors -->
  +    <copy todir="${build.context}" filtering="on">
  +      <fileset dir=".">
  +        <include name="*.*ml"/>
  +      </fileset>
  +    </copy>
  +
  +  </target>
  +
  +  <!-- =================================================================== -->
  +  <!-- Prepares the docs to create a .war                                  -->
  +  <!-- =================================================================== -->
  +  <target name="webapp" depends="init, prepare-docs">
  +    <delete file="${build.context}/cocoon.xconf"/>
  +    <war warfile="${build.dir}/${name}.war"
  +         webxml="${build.context}/WEB-INF/web.xml"
  +         compress="true">
  +
  +      <fileset dir="${build.context}">
  +        <exclude name="WEB-INF/web.xml"/>
  +      </fileset>
  +      <lib dir="lib/endorsed"/>
  +      <lib dir="lib/core"/>
  +      <lib dir="lib/optional"/>
  +      <lib dir="src/scratchpad/lib"/>
  +      <classes dir="${build.context}/WEB-INF/classes/"/>
  +
  +    </war>
  +
  +  </target>
  +
  +  <target name="cleandocs" depends="init" description="* Cleans the build docs directories">
  +    <delete dir="${build.docs}"/>
  +  </target>
  +
  +  <!-- =================================================================== -->
  +  <!-- Creates the API documentation                                       -->
  +  <!-- =================================================================== -->
  +  <target name="javadocs"
  +      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>
  +
  +  <!-- =================================================================== -->
  +  <!-- Validate xml                                                        -->
  +  <!-- =================================================================== -->
  +  <target name="validate-docs" description="Checks that the xml files are valid and conform to the DTD.">
  +    <xmlvalidate failonerror="yes" lenient="yes" warn="yes"
  +       className="org.apache.xerces.parsers.SAXParser">
  +
  +       <classpath>
  +         <fileset dir="./lib/endorsed">
  +           <include name="*.jar"/>
  +         </fileset>
  +       </classpath>
  +
  +       <fileset dir="."
  +                includes="*.x*" excludes="build.xml"/>
  +
  +     </xmlvalidate>
  +  </target>
  +
  +  <!-- =================================================================== -->
  +  <!-- The documentation system                                            -->
  +  <!-- =================================================================== -->
  +  <target name="docs"
  +          depends="cleandocs, owdocs"
  +          description="* Generates the documentation"/>
  +
  +  <!-- =================================================================== -->
  +  <!-- The documentation system                                            -->
  +  <!-- =================================================================== -->
  +  <target name="owdocs"
  +          depends="prepare-docs"
  +          description="* Generates the documentation">
  +
  +    <property name="dir.containing.docs" value="${build.context}"/>
  +
  +    <echo message="-------------------------------------------------------------"/>
  +    <echo message="  Building docs, please stand by ..."/>
  +
  +    <java classname="org.apache.cocoon.Main" fork="true" dir="${dir.containing.docs}" failonerror="true">
  +      <arg value="-c."/>
  +      <arg value="-d../docs"/>
  +      <arg value="-w../work"/>
  +      <arg value="-b../brokenlinks.txt"/>
  +      <arg value="-k../work/logkit.xconf"/>
  +      <arg value="-u${centipede.tools.cents.forrest.loglevel}"/>
  +      <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 successfully in ${build.docs}"/>
  +    <echo message="-------------------------------------------------------------"/>
  +
  +  </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>
  +
  +
  +  <target name="getcvsmodule" depends="init">
  +
  +    <property name="getcvsmodule.work.dir" value="${build.dir}/work/forrest/cvsmodule" />
  +    <property name="getcvsmodule.package" value="xml-forrest" />
  +
  +    <delete dir="${getcvsmodule.work.dir}"/>
  +    <mkdir dir="${getcvsmodule.work.dir}"/>
  +
  +    <cvspass cvsroot=":pserver:anoncvs@jakarta.apache.org:/home/cvspublic"
  +            password="anoncvs"
  +     />
  +
  +    <cvs cvsRoot=":pserver:anoncvs@cvs.apache.org:/home/cvspublic"
  +         package="${getcvsmodule.package}"
  +         dest="${getcvsmodule.work.dir}"
  +         quiet="true"
  +    />
  +  </target>
  +
  +  <target name="deploy" unless="deploy.username, deploy.package-name
  +                                    deploy.data.dir, deploy.hostname, deploy.remotedir">
  +  <!--
  +    deploy.username
  +    deploy.package-name
  +    deploy.data.dir
  +    deploy.hostname
  +    deploy.remotedir
  +   -->
  +
  +    <property name="deploy.work.dir"  value="${build.dir}/work/forrest/deploy/${deploy.package-name}"/>
  +
  +    <delete dir="${deploy.work.dir}"/>
  +    <mkdir dir="${deploy.work.dir}"/>
  +
  +    <property name="deploy.tar.fullpath"
  +              value="${deploy.work.dir}/${deploy.package-name}-deploy"/>
  +
  +    <tar tarfile="${deploy.tar.fullpath}.tar" basedir="${deploy.data.dir}"/>
  +    <gzip zipfile="${deploy.tar.fullpath}.tar.gz" src="${deploy.tar.fullpath}.tar"/>
  +    <delete file="${deploy.tar.fullpath}.tar"/>
  +
  +    <exec dir="." executable="scp">
  +      <!--<arg value="-oProtocol=1"/>-->
  +      <arg value="${deploy.tar.fullpath}.tar.gz"/>
  +      <arg value="${deploy.username}@${deploy.hostname}:${deploy.remotedir}"/>
  +    </exec>
  +
  +    <exec dir="." executable="ssh">
  +      <arg line="-n ${deploy.hostname} -l ${deploy.username} 'cd ${deploy.remotedir};gunzip ${deploy.package-name}-deploy.tar.gz;tar xUvf ${deploy.package-name}-deploy.tar;chmod -R g+u *;rm ${deploy.package-name}-deploy.tar'"/>
  +    </exec>
  +
  +    <delete file="${deploy.tar.fullpath}.tar.gz"/>
  +
  +  </target>
  +
  +  <target name="sendlog" depends="init" if="sendlog.to">
  +
  +   <mail from="forrest-dev@xml.apache.org"
  +         tolist="${sendlog.to}"
  +         subject="[DO NOT REPLY] Building in the Forrest"
  +         files="forrestbot.log" />
  +
  +  </target>
  +
  +
  +  <target name="testpoi" depends="init, testpoicvs, testpoigen, testpoideploy"/>
  +
  +
  +  <target name="testpoicvs" depends="init">
  +
  +    <antcall target="getcvsmodule">
  +      <param name="getcvsmodule.package"  value="jakarta-poi"/>
  +      <param name="getcvsmodule.work.dir" value="${build.dir}/work/forrest/cvsmodule" />
  +    </antcall>
  +
  +  </target>
  +
  +  <target name="testpoigen" depends="init">
  +
  +    <antcall target="prepare-docs">
  +      <param name="documentation.source.dir"  value="${build.dir}/work/forrest/cvsmodule/jakarta-poi/src/documentation"/>
  +    </antcall>
  +
  +    <antcall target="owdocs"></antcall>
  +
  +  </target>
  +
  +  <target name="testpoideploy" depends="init">
  +
  +
  +    <antcall target="deploy">
  +      <param name="deploy.username"     value="forrestbot"/>
  +      <param name="deploy.package-name" value="jakarta-poi"/>
  +      <param name="deploy.data.dir"     value="${build.dir}/docs"/>
  +      <param name="deploy.hostname"     value="krysalis.sourceforge.net"/>
  +      <param name="deploy.remotedir"    value="/home/groups/k/kr/krysalis/htdocs/poi"/>
  +    </antcall>
  +
  +  </target>
  +
  +
  +
  +   <target name="forrestbar" depends="init">
  +
  +      <mkdir dir="${build.dir}" />
  +      <mkdir dir="${build.dir}/work/forrestbar" />
  +
  +      <jar jarfile="${build.dir}/work/forrestbar/forrestbar.jar">
  +         <fileset dir="src/resources/forrestbar" includes="content/**/*" />
  +      </jar>
  +
  +      <copy file="src/resources/forrestbar/install.js" todir="${build.dir}/work/forrestbar" overwrite="true" />
  +
  +      <zip zipfile="${build.dir}/forrestbar.xpi" basedir="${build.dir}/work/forrestbar" />
  +
  +   </target>
  +
  +
  +
  +  <!-- ================================== -->
  +  <!--        Target used by Gump         -->
  +  <!-- ================================== -->
  +
  +  <target  name="gump" description="Target used by Gump">
  +
  +      <antcall target="docs"/>
  +      <antcall target="webapp"/>
  +
  +  </target>
  +
  +  <!-- ================================== -->
  +  <!--    Targets for the remote builds   -->
  +  <!-- ================================== -->
  +
  +  <target name="bot.init" depends="init">
  +    <!-- initializes environment to start on bot targets -->
  +    <property name="bot.build.dir"              value="${xlayout.build.bot.dir}"/>
  +    <property name="bot.work.build.xml"         value="${bot.build.dir}/work.build.xml"/>
  +    <property name="bot.default.parameters.xml" value="${bot.build.dir}/default.parameters.xml"/>
  +    <property name="bot.forrestbot.xconf"       value="forrestbot.conf.xml" />
  +    <property name="bot.templates.build.xml"    value="${xlayout.source.resources.forrestbot.ant.dir}/templates.build.xml" />
  +    <property name="bot.work.builder.xslt"      value="${xlayout.source.resources.forrestbot.xslt.dir}/config2work.xsl" />
  +    <property name="bot.default.builder.xslt"   value="${xlayout.source.resources.forrestbot.xslt.dir}/config2defaults.xsl" />
  +    <mkdir dir="${bot.build.dir}" />
  +  </target>
  +
  +  <target name="bot.conf2build" depends="bot.init" >
  +    <!-- builds the different xml files this process needs.  -->
  +    <style in="${bot.forrestbot.xconf}"
  +       out="${bot.work.build.xml}"
  +       style="${bot.work.builder.xslt}"/>
  +    <style in="${bot.forrestbot.xconf}"
  +       out="${bot.default.parameters.xml}"
  +       style="${bot.default.builder.xslt}"/>
  +    <copy todir="${bot.build.dir}" file="${bot.templates.build.xml}"/>
  +  </target>
  +
  +  <target name="bot.prepare-cp" depends="bot.init, compile" >
  +    <!-- todo: question if it is good practice to share WEB-INF classes -->
  +    <mkdir dir="${bot.build.dir}/WEB-INF/classes"/>
  +    <copy todir="${bot.build.dir}/WEB-INF/classes">
  +      <fileset dir="${resource.dir}/schema">
  +        <include name="CatalogManager.properties"/>
  +      </fileset>
  +      <fileset dir="${build.dest}">
  +        <include name="**/*.class"/>
  +      </fileset>
  +      <fileset dir="${build.scratchpad.dest}">
  +        <include name="**/*.class"/>
  +      </fileset>
  +    </copy>
  +
  +    <path id="forrest.cp">
  +      <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="${bot.build.dir}/WEB-INF/classes"/>
  +    </path>
  +  </target>
  +
  +  <target name="bot.run" depends="bot.conf2build, bot.prepare-cp" >
  +    <!-- delegates to the generated XML file -->
  +    <ant antfile="${bot.work.build.xml}" target="work" inheritRefs="true">
  +        <property name="bot.logs.dir" value="${xlayout.build.bot.projects}" />
  +    </ant>
  +  </target>
  +
  +  <target name="bot" depends="bot.run" />
  +
  +  <!-- =================================================================== -->
  +  <!-- Import Ant-Centipede init targets - sets up basic build stuff       -->
  +  <!-- =================================================================== -->
  +  <!--
  +        This is the target that initializes tasks and properties used
  +        commonly in every other target.
  +
  +        Remember to add depends="init" to every target, so that this
  +        target is called before any other.
  +
  +        This target is internal; to make it unusable from the commandline,
  +        its name starts with a hyphen.
  +        To make it invisible when using -projecthelp, it lacks a description.
  +  -->
  +
  +    &import-antipede;
  +
  +</project>
  
  
  
  1.3       +69 -49    xml-forrest/forrestbot.conf.xml
  
  Index: forrestbot.conf.xml
  ===================================================================
  RCS file: /home/cvs/xml-forrest/forrestbot.conf.xml,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- forrestbot.conf.xml	25 Jul 2002 18:25:11 -0000	1.2
  +++ forrestbot.conf.xml	26 Jul 2002 10:26:12 -0000	1.3
  @@ -1,49 +1,69 @@
  -<?xml version="1.0" encoding="ISO-8859-1"?>
  -<!--
  -
  -  <!DOCTYPE forrest-config SYSTEM "forrest-config.dtd">
  -
  -  DTD will be added once the remote build process 
  -  has been finished and debugged (SN)
  -  
  -  This file contains the configuration for the forrestbot:
  -    - which projects to build
  -    - using which parameters
  -    
  --->
  -<forrest-config>
  -  <defaults>
  -    <get-src type="cvs">
  -      <host name="cvs.apache.org"/>
  -      <root name="/home/cvspublic"/>
  -      <user name="anoncvs"/>
  -      <passwd name="anoncvs"/>
  -    </get-src>
  -    <deploy type="scp">
  -      <host name="krysalis.sourceforge.net"/>
  -      <root name="/home/groups/k/kr/krysalis/htdocs"/>
  -      <user name="forrestbot"/>
  -    </deploy>
  -    <generate>
  -      <skin name="forrest-site"/>
  -      <debuglevel name="ERROR" />
  -    </generate>
  -  </defaults>
  -  <project name="xml-forrest">
  -    <!-- as long as the skin is set using the <filter> the decision for which one to choose
  -         is taken in the prepare stage -->
  -    <prepare>
  -        <skin name="bert"/>
  -    </prepare>
  -    <get-src type="cvs">
  -      <module name="xml-forrest"/>
  -      <dir name="src/documentation"/>
  -    </get-src>
  -    <generate>
  -      <skin name="bert" />
  -    </generate>
  -    <deploy type="scp">
  -      <dir name="forrest"/>
  -    </deploy>
  -  </project>
  -</forrest-config>
  +<?xml version="1.0" encoding="ISO-8859-1"?>
  +<!--
  +
  +  <!DOCTYPE forrest-config SYSTEM "forrest-config.dtd">
  +
  +  DTD will be added once the remote build process
  +  has been finished and debugged (SN)
  +
  +  This file contains the configuration for the forrestbot:
  +    - which projects to build
  +    - using which parameters
  +
  +-->
  +<forrest-config>
  +  <defaults>
  +    <get-src type="cvs">
  +      <host name="cvs.apache.org"/>
  +      <root name="/home/cvspublic"/>
  +      <user name="anoncvs"/>
  +      <passwd name="anoncvs"/>
  +    </get-src>
  +    <get-src type="local-copy" >
  +      <project-dir name="." />
  +    </get-src>
  +    <deploy type="scp">
  +      <host name="krysalis.sourceforge.net"/>
  +      <root name="/home/groups/k/kr/krysalis/htdocs"/>
  +      <user name="forrestbot"/>
  +    </deploy>
  +    <generate>
  +      <skin name="forrest-site"/>
  +      <debuglevel name="ERROR" />
  +    </generate>
  +  </defaults>
  +
  +  <project name="xml-forrest">
  +    <prepare>
  +        <skin name="bert"/>
  +    </prepare>
  +
  +    <get-src type="cvs">
  +      <module name="xml-forrest"/>
  +      <dir name="src/documentation"/>
  +    </get-src>
  +    <!-- as long as the skin is set using the <filter> tricks:
  +         the decision for which one to choose is taken in the prepare stage
  +         rather then the generate stage
  +    <generate>
  +      <skin name="bert" />
  +    </generate>
  +    -->
  +    <deploy type="scp">
  +      <dir name="forrest"/>
  +    </deploy>
  +  </project>
  +
  +  <project name="xml-forrest-local">
  +    <prepare>
  +        <skin name="bert"/>
  +    </prepare>
  +    <get-src type="local-copy">
  +      <content-dir name="src/documentation"/>
  +    </get-src>
  +    <deploy type="local-copy">
  +      <destination name="build/site"/>
  +    </deploy>
  +  </project>
  +
  +</forrest-config>
  
  
  
  1.4       +71 -7     xml-forrest/src/resources/forrestbot/ant/templates.build.xml
  
  Index: templates.build.xml
  ===================================================================
  RCS file: /home/cvs/xml-forrest/src/resources/forrestbot/ant/templates.build.xml,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- templates.build.xml	25 Jul 2002 18:25:12 -0000	1.3
  +++ templates.build.xml	26 Jul 2002 10:26:12 -0000	1.4
  @@ -35,7 +35,7 @@
   
     <!--
       <property name="template.echo" value="true" />
  -    
  +
       uncomment this one or use -Dtemplate.echo=true at the commandline
       if you want to know the configuration of each template
     -->
  @@ -52,6 +52,7 @@
       <property name="forrest.context.dir" value="${xlayout.source.resources.dir}" />
   
         <!-- where cocoon can have his toy-work-environment while generating: -->
  +      <!-- mind: other stages can use this as a temp dir as well     -->
         <property name="project.work.dir"
                 value="${project.context.dir}/../work" />
         <!-- where cocoon will spit out the generated stuff: -->
  @@ -62,6 +63,7 @@
   
     <!-- ________________ PREPARE TEMPLATES __________________ -->
     <target name="echo.prepare" if="template.echo">
  +
       <echo message="prepare workstage for project ${project.name}"/>
       <echo message="skin = ${prepare.skin}"/>
     </target>
  @@ -70,10 +72,8 @@
       <!-- make it a clean space to work in -->
       <delete dir="${project.context.dir}"/>
       <delete dir="${project.docs.dir}"/>
  -    <delete dir="${project.work.dir}"/>
       <mkdir dir="${project.context.dir}"/>
       <mkdir dir="${project.docs.dir}"/>
  -    <mkdir dir="${project.work.dir}"/>
   
       <!-- copy over forrest config stuf and prepare the environment -->
       <!-- todo: get rid of the filter way of working ?
  @@ -105,6 +105,8 @@
       </copy>
   
       <!-- decided to share this among all projects handled by bot
  +         Todo: remove what is now disabled if it proves to work
  +
       <mkdir dir="${project.context.dir}/WEB-INF/classes"/>
       <copy todir="${project.context.dir}/WEB-INF/classes">
         <fileset dir="${project.context.dir}/resources/schema">
  @@ -154,11 +156,13 @@
         </fileset>
       </copy>
   
  -    <!-- Copy the project descriptors can't be done here, since that's
  -         project specific -->
  +    <!-- Copy the project descriptors can't be done here, since that is
  +         project specific: see get-src -->
     </target>
   
  +
     <!-- ________________ GET-SRC TEMPLATES __________________ -->
  +  <!-- [[get-src type cvs ]] -->
     <target name="echo.get-src.cvs" if="template.echo">
       <echo message="get-src workstage of type CVS for project ${project.name}"/>
       <echo message="cvs login: usr= ${get-src.cvs.user} / pwd= ${get-src.cvs.passwd}"/>
  @@ -198,7 +202,29 @@
       </copy>
     </target>
   
  +  <!-- [[get-src type local-copy ]] -->
  +  <target name="echo.get-src.local-copy" if="template.echo">
  +    <echo message="get-src workstage of type LOCAL-COPY for project ${project.name}"/>
  +    <echo message="content-dir: ${get-src.cvs.content-dir} provides xdocs"/>
  +    <echo message="project-dir: ${get-src.cvs.project-dir} provides [project-description].*ml files"/>
  +  </target>
  +
  +  <target name="template.get-src.local-copy" depends="shared.set-props, echo.get-src.local-copy">
  +    <!-- copy the xdocs content over to the context space -->
  +    <copy todir="${project.context.dir}">
  +      <fileset dir="${get-src.local-copy.content-dir}" />
  +    </copy>
  +    <!-- copy the project descriptors over to the context space  -->
  +    <copy todir="${project.context.dir}" >
  +      <fileset dir="${get-src.local-copy.project-dir}">
  +        <include name="*.*ml"/>
  +      </fileset>
  +    </copy>
  +  </target>
  +
  +
     <!-- ________________ GENERATE TEMPLATES __________________ -->
  +
     <target name="echo.generate" if="template.echo">
       <property name="classpath-dump" refid="forrest.cp"/>
       <echo message="generate workstage for project ${project.name}"/>
  @@ -208,6 +234,10 @@
     </target>
   
     <target name="template.generate" depends="shared.set-props, echo.generate">
  +    <!-- clean out the temp space -->
  +    <delete dir="${project.work.dir}"/>
  +    <mkdir dir="${project.work.dir}"/>
  +
       <java classname="org.apache.cocoon.Main" fork="true"
             dir="${project.context.dir}" failonerror="true"
             classpathref="forrest.cp"
  @@ -222,11 +252,45 @@
     </target>
   
     <!-- ________________ DEPLOY TEMPLATES __________________ -->
  +  <!-- [[deploy type scp ]] -->
     <target name="echo.deploy.scp" if="template.echo">
  -      <echo message="deploy workstage of type scp for project ${project.name}"/>
  +    <echo message="deploy workstage of type scp for project ${project.name}"/>
  +    <echo message="will deploy to ${deploy.scp.host}" />
  +    <echo message="as user ${deploy.scp.user}" />
  +    <echo message="into dir ${deploy.scp.root}/${deploy.scp.dir}" />
     </target>
  +
     <target name="template.deploy.scp" depends="shared.set-props, echo.deploy.scp">
  -    <!-- todo: FIXME: not implemented yet -->
  +    <!-- clean out the temp space -->
  +    <delete dir="${project.work.dir}"/>
  +    <mkdir dir="${project.work.dir}"/>
  +    <property name="tempname" value="${project.name}-deploy" />
  +    <property name="tempfile"
  +              value="${project.work.dir}/${tempname}" />
  +    <property name="remotedir" value="${deploy.scp.root}/${deploy.scp.dir}" />
  +    <tar tarfile="${tempfile}.tar" basedir="${project.docs.dir}"/>
  +    <gzip zipfile="${tempfile}.tar.gz" src="${tempfile}.tar"/>
  +    <delete file="${tempfile}.tar"/>
  +    <exec dir="." executable="scp">
  +      <!--<arg value="-oProtocol=1"/>-->
  +      <arg value="${tempfile}.tar.gz"/>
  +      <arg value="${deploy.scp.user}@${deploy.scp.host}:${remotedir}"/>
  +    </exec>
  +    <exec dir="." executable="ssh">
  +      <arg line="-n ${deploy.scp.host} -l ${deploy.scp.user} 'cd ${remotedir};gunzip ${tempname}.tar.gz;tar xUvf ${tempname}-deploy.tar;chmod -R g+u *;rm ${tempname}-deploy.tar'"/>
  +    </exec>
  +    <delete file="${tempfile}.tar.gz"/>
  +  </target>
  +
  +  <!-- [[deploy type local-copy ]] -->
  +  <target name="echo.deploy.local-copy" if="template.echo">
  +      <echo message="deploy workstage of type scp for project ${project.name}"/>
  +      <echo message="destination dir = ${deploy.local-copy.destination}" />
  +  </target>
  +  <target name="template.deploy.local-copy" depends="shared.set-props, echo.deploy.local-copy">
  +    <copy todir="${deploy.local-copy.destination}">
  +        <fileset dir="${project.docs.dir}" />
  +    </copy>
     </target>
   
   
  
  
  
  1.3       +1 -1      xml-forrest/src/resources/forrestbot/xslt/config2work.xsl
  
  Index: config2work.xsl
  ===================================================================
  RCS file: /home/cvs/xml-forrest/src/resources/forrestbot/xslt/config2work.xsl,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- config2work.xsl	22 Jul 2002 20:28:33 -0000	1.2
  +++ config2work.xsl	26 Jul 2002 10:26:13 -0000	1.3
  @@ -37,7 +37,7 @@
      <target name="work">
        <parallel>
          <xsl:for-each select="project">
  -         <antcall inheritRefs="true" target="work.{@name}"/>
  +         <antcall inheritRefs="true" target="work.{@name}" />
          </xsl:for-each>
        </parallel>
      </target>