You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@avalon.apache.org by vi...@apache.org on 2002/06/28 07:00:27 UTC

cvs commit: jakarta-avalon-apps/sevak build.xml

vinayc      2002/06/27 22:00:27

  Added:       sevak    build.xml
  Log:
  Sevak - Catalina Wrapper
  
  Revision  Changes    Path
  1.1                  jakarta-avalon-apps/sevak/build.xml
  
  Index: build.xml
  ===================================================================
  <?xml version="1.0"?>
  
  <project default="main" basedir=".">
  
    <!--
      Give user a chance to override without editing this file
      (and without typing -D each time they compile it)
    -->
    <property file="ant.properties"/>
    <property file="${user.home}/ant.properties"/>
  
    <property name="name" value="sevak"/>
    <property name="Name" value="Sevak"/>
    <property name="version" value="0.6"/>
    <property name="year" value="2002"/>
  
    <property name="build.debug" value="on"/>
    <property name="build.optimize" value="off"/>
    <property name="build.deprecation" value="off"/>
  
    <!-- Set the installation variables for Cornerstone/Phoenix -->
    <property name="phoenix.home" value="../../jakarta-avalon-phoenix/dist"/>
    <property name="install.dir" value="${phoenix.home}/apps"/>
  
    <!-- Set the properties for intermediate directory -->
    <property name="build.dir" value="build"/>
    <property name="build.lib" value="${build.dir}/lib"/>
    <property name="build.src" value="${build.dir}/src"/>
    <property name="build.classes" value="${build.dir}/classes"/>
    <property name="build.demoClasses" value="${build.dir}/demoClasses"/>
    <property name="build.xdoclet" value="${build.dir}/xdoclet"/>
    <property name="build.demoXdoclet" value="${build.dir}/demoXdoclet"/>
    <property name="build.docs" value="${build.dir}/docs"/>
    <property name="build.context" value="${build.dir}/documentation"/>  
    <property name="build.xdocs" value="${build.context}/content/xdocs"/>
    <property name="build.reports" value="${build.dir}/reports"/>
  
    <!-- Set the properties for source directories -->
    <property name="src.dir" value="src"/>
    <property name="lib.dir" value="lib"/>
    <property name="java.dir" value="${src.dir}/java"/>
    <property name="test.dir" value="${src.dir}/test"/>
    <property name="demo.dir" value="${src.dir}/demo"/>
    <property name="java.demo.dir" value="${demo.dir}/java"/>
    <property name="manifest.dir" value="${src.dir}/manifest"/>
    <property name="conf.dir" value="${src.dir}/conf"/>
    <property name="conf.demo.dir" value="${demo.dir}/conf"/>
    <property name="tools.dir" location="../../jakarta-avalon/tools"/>
    <property name="docs.dir" value="docs"/>
    <property name="xdocs.dir" value="${src.dir}/xdocs"/>  
    <property name="context.dir" value="../../jakarta-avalon/src/documentation"/>  
    <property name="junit.jar" value="${tools.dir}/lib/junit-3.7.jar"/>
    <property name="tools.jar" value="${java.home}/../lib/tools.jar"/>  
    <property name="dist.base" value="dist"/>
    <property name="do.checkstyle" value="true"/>
  
  
    
    <!-- Tomcat Jars -->
    <property name="tomcat.jars.dir" value="${lib.dir}/tomcat-jars"/>
  
  
    <path id="project.class.path">
      <pathelement path="${java.class.path}" />
      <pathelement location="xerces.jar2"/>  
      <pathelement path="${build.classes}" />
  
      <fileset dir="${tomcat.jars.dir}">
        <include name="*.jar" />
      </fileset>    
  
  	 <fileset dir="../common/lib">
        <include name="*.jar" />
      </fileset>
  
    </path>
  
    <path id="tools.class.path">
      <pathelement location="${junit.jar}"/>
      <pathelement location="${tools.jar}"/>
      <fileset dir="${tools.dir}/lib"/>
      <fileset dir="${tools.dir}/ext"/>
    </path>
  
    <path id="test.class.path">
  	<fileset dir="../common/lib">
        <include name="*.jar" />
      </fileset>
  	<pathelement path="${build.lib}/sevak.jar"/>
    </path>
    
  
  
    <taskdef name="sar" classname="org.apache.avalon.phoenix.tools.tasks.Sar">
      <classpath refid="project.class.path" />
    </taskdef>
  
    <!-- Help on usage -->
    <target name="help" depends="usage"/>
    <target name="usage">
      <echo message="Run ant -projecthelp to get a list of targets to run"/>
    </target>
  
    <!-- Setup the filters -->
    <target name="setup-filters">
      <filter token="Name" value="Avalon Apps - Sevak"/>
      <filter token="name" value="catlon"/>
      <filter token="version" value="${version}"/>
      <filter token="year" value="${year}"/>
      <filter token="status" value="${status}"/>
      <filter token="release" value="${release}"/>
      <filter token="short-version" value="${short.version}"/>
  
      <property name="avalon.base" value="http://jakarta.apache.org/avalon"/>
      <property name="framework.base" value="http://jakarta.apache.org/avalon/framework"/>
      <property name="phoenix.base" value="http://jakarta.apache.org/avalon/phoenix"/>
      <property name="cornerstone.base" value="http://jakarta.apache.org/avalon/cornerstone"/>
      <property name="logkit.base" value="http://jakarta.apache.org/avalon/logkit"/>
      <property name="testlet.base" value="http://jakarta.apache.org/avalon/testlet"/>
  
      <filter token="year" value="${year}"/>
      <filter token="AVALON_BASE" value="${avalon.base}"/>
      <filter token="FRAMEWORK_BASE" value="${framework.base}"/>
      <filter token="PHOENIX_BASE" value="${phoenix.base}"/>
      <filter token="CORNERSTONE_BASE" value="${cornerstone.base}"/>
      <filter token="LOGKIT_BASE" value="${logkit.base}"/>
      <filter token="TESTLET_BASE" value="${testlet.base}"/>
    </target>
  
  
    <!-- Check Presense Of Tomcat 4.0 jars -->
   <target name="checkCatalinaJars">
  	<condition property="catalina.present">
  		<available file="${tomcat.jars.dir}/catalina.jar"/>
  		<!-- checking for avalon-framework.jar too here -->
  	</condition>
  
   </target>
  
   <target name="checkFrameworkClass">
  	<available classname="org.apache.avalon.framework.logger.Logger" classpathref="project.class.path" property="framework.present"/>	
   </target>
  
   <target name="checkFramework" depends="checkFrameworkClass" unless="framework.present">
  	<echo>**********************************</echo>
      <echo>***** Please set the        ******</echo>
      <echo>****${avalon-framework.jar} ******</echo>
      <echo>**********************************</echo>   
      
      <fail message="Framework  needed. See above."/>
  
   </target>
  
   <target name="checkNeccesaryJars" depends="checkFramework,checkCatalinaJars" unless="catalina.present">
  	<echo>**********************************</echo>
      <echo>***** Please execute target ******</echo>
      <echo>****     'get-catalina '    ******</echo>
  	<echo>****  to retrieve Tomcat4.0 ******</echo>
  	<echo>****  jars or place the jars *****</echo>
  	<echo>****  in ${tomcat.jars.dir} dir  *****</echo>
      <echo>**********************************</echo>   
      
      <fail message="Catalina needed. See above."/>
  
   </target>
  
   <!-- Get catalina jars from apache repository -->
  
   <target name="get-catalina">
   
      <mkdir  dir="tmp-dir-to-delete"/>
  	<mkdir dir="${lib.dir}"/>
  	<mkdir dir="${tomcat.jars.dir}"/>
  
  	<get src="http://jakarta.apache.org/builds/jakarta-tomcat-4.0/release/v4.0.3/bin/jakarta-tomcat-4.0.3.zip" 
  	dest="tmp-dir-to-delete/jakarta-tomcat.zip" 
  	verbose="true"
  	usetimestamp="true"/>
  	
  	<!-- Get the Jakarta-COMMONS jar files which do NOT come along with the tomcat distribution -->
  
  	<get src="http://jakarta.apache.org/builds/jakarta-tomcat-connectors/coyote/release/v1.0-rc2/commons-logging.jar"
  		dest="${tomcat.jars.dir}/commons-logging.jar"
  		verbose="true"
  		usetimestamp="true"
  	/>
  
  	<get src="http://jakarta.apache.org/builds/jakarta-tomcat-connectors/coyote/release/v1.0-rc2/tomcat-coyote.jar"
  		dest="${tomcat.jars.dir}/tomcat-coyote.jar"
  		verbose="true"
  		usetimestamp="true"
  	/>
  
  	<get src="http://jakarta.apache.org/builds/jakarta-tomcat-connectors/coyote/release/v1.0-rc2/tomcat-http11.jar"
  		dest="${tomcat.jars.dir}/tomcat-http11.jar"
  		verbose="true"
  		usetimestamp="true"
  	/>
  
  	<get src="http://jakarta.apache.org/builds/jakarta-tomcat-connectors/coyote/release/v1.0-rc2/tomcat-util.jar"
  		dest="${tomcat.jars.dir}/tomcat-util.jar"
  		verbose="true"
  		usetimestamp="true"
  	/>
  
  
  	<unzip src="tmp-dir-to-delete/jakarta-tomcat.zip" dest="tmp-dir-to-delete" />
  	
  
      <copy todir="${tomcat.jars.dir}" flatten="true">
        <fileset dir="tmp-dir-to-delete">
          <include  name="**/bin/*.jar"/>
  		<include  name="**/lib/*.jar"/>
        </fileset>
  	</copy>
  	
  	<delete dir="tmp-dir-to-delete"/>
  	
   </target>
   <!-- prepare -->
   <target name="prepare" depends="checkNeccesaryJars" >
  	<mkdir dir="${lib.dir}"/>
   </target>
  
    <!-- Compiles project -->
    <target name="compile" depends="prepare" >
  
      <mkdir dir="${build.classes}"/>
  
      <javac srcdir="${java.dir}"
             destdir="${build.classes}"
             debug="${build.debug}"
             optimize="${build.optimize}"
             deprecation="${build.deprecation}">
        <classpath refid="project.class.path" />
        <include name="**"/>
      </javac>
  
      <copy todir="${build.classes}">
        <fileset dir="${java.dir}">
          <exclude name="**/test/**"/>
          <exclude name="**/*.java"/>
        </fileset>
      </copy>
  
    </target>
  
    <!-- Make .xinfo and manifest automatically for blocks -->
    <target name="phoenix-xdoclet" depends="compile" >
    
      <mkdir dir="${build.xdoclet}"/>
    
      <taskdef name="phoenix-blocks"
               classname="org.apache.avalon.phoenix.tools.xdoclet.PhoenixXDoclet"
               classpathref="project.class.path"/>
  
      <phoenix-blocks
          destdir="${build.xdoclet}"
          classpathref="project.class.path">
        <fileset dir="${java.dir}">
          <include name="**/*.java" />
        </fileset>
        <blockinfo/>
        <manifest manifestFile="manifest.mf" />
      </phoenix-blocks>
  
    </target>
  
    <!-- Jars up project -->
    <target name="jars" depends="phoenix-xdoclet" >
  
      <mkdir dir="${build.lib}"/>
  
      <jar jarfile="${build.lib}/sevak.jar"
           manifest="${build.xdoclet}/manifest.mf">
        <fileset dir="${build.classes}">
          <include name="org/apache/avalon/apps/sevak/**"/>
        </fileset>
       <fileset dir="${build.xdoclet}">
          <include name="org/apache/avalon/apps/sevak/**/*.xinfo"/>
        </fileset>
      </jar>
  
    </target>
  
   
    <target name="sars" depends="jars" >
  
      <sar sarfile="${build.lib}/avalon-sevak.sar"
           config="${conf.dir}/sevak-config.xml"
           environment="${conf.dir}/sevak-environment.xml"
           assembly="${conf.dir}/sevak-assembly.xml" >
  
        <lib dir="${build.lib}/">
          <include name="*.jar"/>
        </lib>
  
        <lib dir="../../jakarta-avalon-apps/common/lib">
          <include name="cornerstone.jar"/>
        </lib>
  	
  	  <lib dir="${tomcat.jars.dir}">
          <include name="*.jar"/>
        </lib>
  
  	  <lib dir="${java.home}/../lib/">
  		<include name="tools.jar"/>
  	  </lib>
      </sar>
      
      <mkdir dir="${dist.base}"/>
  
      <copy todir="${dist.base}">
        <fileset dir="${build.lib}">
          <include name="**"/>
        </fileset>
      </copy>    
  
    </target>
  
    <target name="main" depends="sars" description="Default target to generate build products minus docs"/> 
    <target name="all" depends="main,docs" description="Generate build products including docs" /> 
  	
    <!-- CheckStyle tasks-->
    <target name="checkstyle" if="do.checkstyle" description="Checkstyle">
  
          <!-- this invocation of checkstyle requires that checkstyle be downloaded and setup -->
          <!-- thats why you are required to define do.checkstyle property to generate the report -->
  		<mkdir dir="${build.dir}"/>
          <taskdef name="checkstyle"
              classname="com.puppycrawl.tools.checkstyle.CheckStyleTask">
              <classpath refid="project.class.path"/>
          </taskdef>
          <checkstyle
              lcurlyType="nl"
              lcurlyMethod="nl"
              lcurlyOther="nl"
              rcurly="ignore"
              allowProtected="false"
              allowPackage="false"
              allowNoAuthor="false"
              maxLineLen="100"
              maxMethodLen="100"
              maxConstructorLen="100"
              memberPattern="^m_[a-z][a-zA-Z0-9]*$"
              staticPattern="^c_[a-z][a-zA-Z0-9]*$"
              constPattern="(^c_[a-z][a-zA-Z0-9]*$)|([A-Z_]*$)"
              ignoreImportLen="true"
              allowTabs="false"
              javadocScope="protected"
              ignoreWhitespace="true"
              cacheFile="checkstyle.cache"
              failOnViolation="false"
              ignoreCastWhitespace="true">
              <fileset dir="${java.dir}">
                  <include name="**/*.java"/>
              </fileset>
              <formatter type="plain"/>
              <formatter type="xml" toFile="${build.dir}/checkstyle-results.xml"/>
          </checkstyle>
      </target>
  
      <target name="checkstyle-report"
          depends="checkstyle"
          if="do.checkstyle"
          description="Generate Checkstyle Report">
  
          <mkdir dir="${build.reports}/checkstyle"/>
          <property name="checkstyle.pathhack" location="."/>
          <style style="${tools.dir}/etc/checkstyle-frames.xsl" in="${build.dir}/checkstyle-results.xml"
              out="${build.reports}/checkstyle/delete-me.html">
              <param name="pathhack" expression="${checkstyle.pathhack}"/>
          </style>
  
      </target>
  
    
    <!-- Performs unit tests -->
    <target name="check" depends="compile" description="Perform any built in tests">
    </target>
  
    <!-- Create the API documentation -->
    <target name="javadocs" description="Generates the Java Docs">
  
      <delete dir="${build.docs}/api"/>
      <mkdir dir="${build.docs}/api"/>
  
      <javadoc packagenames="org.apache.*"
               sourcepath="${java.dir}"
               destdir="${build.docs}/api">
        <classpath refid="project.class.path" />
        <doclet name="com.sun.tools.doclets.standard.Standard">
         <param name="-author"/>
         <param name="-version"/>
         <param name="-doctitle" value="${Name}"/>
         <param name="-windowtitle" value="${Name} API"/>
         <param name="-bottom"
                value="&quot;Copyright &#169; 2001 Apache Jakarta Project. All Rights Reserved.&quot;"/>
        </doclet>
      </javadoc>
    </target>
  
    <!-- Prepares the documentation directory -->
    <target name="docs" depends="setup-filters, javadocs" description="Generates the Docs">
  	  <property name="use.skin"              value="avalon-site"/>
  
        <!-- Skin 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="jakarta"/>
        <filter token="link2.href"        value="http://jakarta.apache.org"/>
        <filter token="link3"             value="avalon"/>
        <filter token="link3.href"        value="http://jakarta.apache.org/avalon/"/>
        <filter token="group-logo.src"    value="images/jakarta-logo.gif"/>
        <filter token="group-logo.href"   value="http://jakarta.apache.org/"/>
        <filter token="project-logo.src"  value="images/header.gif"/>                    
        <filter token="project-logo.href" value="http://jakarta.apache.org/avalon/"/>                    
        <filter token="year" value="2002"/>  
        <filter token="vendor" value="Apache Software Foundation"/>  
      
          <mkdir dir="${build.context}"/>
          <mkdir dir="${build.docs}"/>
          <mkdir dir="${build.xdocs}"/>
          <mkdir dir="${build.dir}/work"/>       
  
          <copy todir="${build.context}" overwrite="true" filtering="on">
              <fileset dir="${context.dir}">
                  <exclude name="**/*.gif"/>
                  <exclude name="**/*.jpg"/>
                  <exclude name="**/*.png"/>
              </fileset>
          </copy>
  
          <copy todir="${build.context}" filtering="off">
              <fileset dir="${context.dir}">
                  <include name="**/*.gif"/>
                  <include name="**/*.jpg"/>
                  <include name="**/*.png"/>
              </fileset>
          </copy>
          <copy todir="${build.xdocs}" filtering="on" overwrite="true">
              <fileset dir="${xdocs.dir}"/>
          </copy>
          
          <echo message="-------------------------------------------------------------"/>
          <echo message="  Building docs, please stand by ..."/>
          
          <java classname="org.apache.cocoon.Main" fork="true" maxmemory="128m" failonerror="true">
              <arg value="-c${build.context}/"/>
              <arg value="-d${build.docs}"/>
              <arg value="-w${build.dir}/work"/>
              <arg value="-l${build.dir}/work/cocoon.log"/>
              <arg value="-uWARN"/>
              <arg value="index.html"/>
              <classpath>
                  <path refid="tools.class.path"/>
                  <fileset dir="${tools.dir}/ext"/>
              </classpath>
          </java>
          
          <!-- hack for stupid transport on api link -->
          <replace dir="${build.docs}" token="http://hack.hack" value="api/index.html">
            <include name="*.html"/>
          </replace>        
  
  
         <echo message="  ...docs generated succesfully in ./build/docs dir."/>
         <echo message="-------------------------------------------------------------"/>    
  
      
    </target>
  <!--
    <target name="site" depends="docs" description=" Places Docs ready for hosting on website">  
    
      <mkdir dir="../site/docs/apps/sevak"/>     
      <copy todir="../site/docs/apps/sevak">
        <fileset dir="docs">
          <include name="**"/>
        </fileset>
      </copy>        
    
    </target>  
  -->
  
  
  
    <!-- Completely build all dists -->
    <target name="dist" description="Generates the distribution">
  
      <property name="dist.name" value="${Name}-${version}"/>
  
      <mkdir dir="${dist.base}"/>
  
      <antcall target="bin-dist" inheritAll="false">
        <param name="bin.dist.dir" value="${dist.name}" />
      </antcall>
  
      <zip zipfile="${dist.base}/${dist.name}-bin.zip"
           basedir="${dist.name}/.."
           includes="${dist.name}/**"/>
  
      <tar longfile="gnu" tarfile="${dist.base}/${dist.name}-bin.tar">
        <tarfileset dir="${dist.name}/.." username="avalon" group="avalon">
          <include name="${dist.name}/**"/>
        </tarfileset>
      </tar>
  
      <gzip zipfile="${dist.base}/${dist.name}-bin.tar.gz"
            src="${dist.base}/${dist.name}-bin.tar"/>
  
      <delete file="${dist.base}/${dist.name}-bin.tar"/>
      <delete dir="${dist.name}" />
  
      <antcall target="src-dist" inheritAll="false">
        <param name="src.dist.dir" value="${dist.name}" />
      </antcall>
  
      <zip zipfile="${dist.base}/${dist.name}-src.zip"
           basedir="${dist.name}/.."
           includes="${dist.name}/**"/>
  
      <tar longfile="gnu" tarfile="${dist.base}/${dist.name}-src.tar" >
        <tarfileset dir="${dist.name}/.." mode="755" username="avalon" group="avalon">
          <include name="${dist.name}/build.sh"/>
        </tarfileset>
        <tarfileset dir="${dist.name}/.." username="avalon" group="avalon">
          <include name="${dist.name}/**"/>
          <exclude name="${dist.name}/build.sh"/>
        </tarfileset>
      </tar>
  
      <gzip zipfile="${dist.base}/${dist.name}-src.tar.gz"
            src="${dist.base}/${dist.name}-src.tar"/>
      <delete file="${dist.base}/${dist.name}-src.tar"/>
      <delete dir="${dist.name}" />
  
    </target>
  
    <!-- Creates all the .sar files -->  
    <target name="bin-dist" depends="all" >
  
      <!-- bin.dist.dir usually set before this target is called -->
      <property name="bin.dist.dir" value="dist"/>
      <property name="bin.dist.lib" value="${bin.dist.dir}/lib"/>
      <property name="bin.dist.docs" value="${bin.dist.dir}/docs"/>
  
      <mkdir dir="${bin.dist.docs}"/>
      <copy todir="${bin.dist.docs}">
        <fileset dir="${docs.dir}"/>
      </copy>
  
      <copy file="${build.lib}/avalon-sevak.sar" tofile="${bin.dist.dir}/avalon-sevaks-${version}.sar"/>
  
      <chmod dir="${bin.dist.dir}" perm="go-rwx" />
    </target>
  
    <target name="src-dist" depends="docs" >
      <!-- src.dist.dir has usually already been set -->
      <property name="src.dist.dir" value="dist-src"/>
      <property name="src.dist.src" value="${src.dist.dir}/src"/>
      <property name="src.dist.docs" value="${src.dist.dir}/docs"/>
  
      <mkdir dir="${src.dist.docs}"/>
  
      <copy todir="${src.dist.docs}">
        <fileset dir="${docs.dir}"/>
      </copy>
  
      <copy todir="${src.dist.src}">
        <fileset dir="${src.dir}"/>
      </copy>
      <fixcrlf srcdir="${src.dist.src}/java" includes="**/*.java" eol="lf"/>
  
      <chmod dir="${src.dist.dir}" perm="go-rwx" />
    </target>
  
    <target name="install" depends="main" description="Installs into Phoenix" > 
      <!-- <fail message="install.dir not specified." unless="install.dir"/> -->
      <echo message="Installing to ${install.dir}" />
      <delete dir="${install.dir}/avalon-sevak" />
      <copy file="${build.lib}/avalon-sevak.sar" todir="${install.dir}" />
    </target>
  
    <target name="uninstall" description="Uninstalls from Phoenix">
  
      <!-- <fail message="install.dir not specified." unless="install.dir"/> -->
      <delete dir="${install.dir}/avalon-sevak/" />
      <delete file="avalon-sevak.sar" dir="${install.dir}"/>
    </target>
  
    <target name="clean" description="Cleans up artifacts from build process">
      <delete dir="${build.dir}" />
      <delete>
        <fileset dir="." includes="**/*~" defaultexcludes="no"/>
      </delete>
    </target>
  
    <target name="distclean" depends="clean" description="Cleans up all generated files and directories">
      <delete dir="${docs.dir}" />
      <delete dir="${bin.dist.dir}" />
      <delete dir="${dist.base}" />
  	<delete>
  		<fileset dir="${tomcat.jars.dir}" includes="*.*" defaultexcludes="no" />
  	</delete>
    </target>
  
   <!-- Compile Demo Classes -->
  
   <target name="compileDemo" description="Compiles the Demo Block">
   	<delete dir="${build.demoClasses}"/>
  	<delete dir="${build.demoXdoclet}"/>
  
  	<mkdir dir="${build.demoClasses}"/>
  	<javac srcdir="${java.demo.dir}"
             destdir="${build.demoClasses}"
             debug="${build.debug}"
             optimize="${build.optimize}"
             deprecation="${build.deprecation}">
        <classpath refid="test.class.path" />
        <include name="**"/>
      </javac>
   </target>
  
    <target name="phoenix-demo-xdoclet" depends="compileDemo" ><!-- if="hsql.present"> -->
    
      <mkdir dir="${build.demoXdoclet}"/>
    
      <taskdef name="phoenix-blocks"
               classname="org.apache.avalon.phoenix.tools.xdoclet.PhoenixXDoclet"
               classpathref="test.class.path"/>
  
      <phoenix-blocks
          destdir="${build.demoXdoclet}"
          classpathref="test.class.path">
        <fileset dir="${java.demo.dir}">
          <include name="**/*.java" />
        </fileset>
        <blockinfo/>
        <manifest manifestFile="manifest.mf" />
      </phoenix-blocks>
  
    </target>
  
   
  
   <target name="jarDemo" depends="phoenix-demo-xdoclet" description="Makes a jar file out of the Demo classes">
  	<mkdir dir="${build.lib}"/>
  
      <jar jarfile="${build.lib}/sevakDemo.jar"
           manifest="${build.demoXdoclet}/manifest.mf">
        <fileset dir="${build.demoClasses}">
          <include name="org/apache/avalon/apps/sevak/**"/>
        </fileset>
       <fileset dir="${build.demoXdoclet}">
          <include name="org/apache/avalon/apps/sevak/**/*.xinfo"/>
        </fileset>
      </jar>
   </target>
   <!--- Build Test SAR Archive -->
   <target name="demoSAR" depends="jars,jarDemo" description="Builds a Demo block which uses Sevak Service">
  	<sar sarfile="${build.lib}/avalon-sevak-demo.sar"
           config="${conf.demo.dir}/sevak-demo-config.xml"
           environment="${conf.demo.dir}/sevak-demo-environment.xml"
           assembly="${conf.demo.dir}/sevak-demo-assembly.xml" >
  
        <lib dir="${build.lib}/">
          <include name="*.jar"/>
        </lib>
  
        <lib dir="../../jakarta-avalon-apps/common/lib">
          <include name="cornerstone.jar"/>
        </lib>
  	
  	  <lib dir="${tomcat.jars.dir}">
          <include name="*.jar"/>
        </lib>
  
  	  
  	  <lib dir="${java.home}/../lib/">
  		<include name="tools.jar"/>
  	  </lib>
  	
  	  <zipfileset dir="${demo.dir}/webapps/" prefix="webapps"/>
  
      </sar>
  
  	<!-- Copy build/lib contents to dist/ folder -->
  
  	<copy todir="${dist.base}">
        <fileset dir="${build.lib}">
          <include name="**"/>
        </fileset>
      </copy>    
  
   </target>
  
   <target name="installDemo" depends="demoSAR" description="Installs Demo SAR into Phoenix" > 
       <echo message="Installing to ${install.dir}" />
      <delete dir="${install.dir}/avalon-sevak-demo" />
      <copy file="${build.lib}/avalon-sevak-demo.sar" todir="${install.dir}" />
    </target>
  
  </project>
  
  
  

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>