hi,
this is my AntFile for the beer app.(
Tomcat and Resin app-Servers)
<?xml version="1.0"?>
<!-- Author S mendez-rueda -->
<project name="beerApp development" default="compileSrc" basedir=".">
<!-- the name of the wep application -->
<property name="app.name" value="beerApp"/>
<!-- =================================================================== -->
<!-- properties reflecting the directory structur of the web application-->
<!-- development -->
<!-- =================================================================== -->
<property file="${basedir}/build.properties"/>
<property name="src" location="${basedir}/src"/>
<property name="src.web" location="${src}/com/example/web"/>
<property name="src.model" location="${src}/com/example/model"/>
<property name="etc" location="${basedir}/etc"/>
<property name="lib" location="${basedir}/lib"/>
<property name="web" location="${basedir}/web"/>
<property name="classes" location="${basedir}/classes"/>
<!-- =================================================================== -->
<!-- properties reflecting the directory structur of the web application-->
<!-- tomcat deployement -->
<!-- =================================================================== -->
<property name="tomDeployDir" location="${tomcat.server}/${app.name}"/>
<property name="tomLibDir" location="${tomcat.server}/${app.name}/lib"/>
<property name="tomClassDir" location="${tomcat.server}/${app.name}/WEB-INF/classes"/>
<!-- =================================================================== -->
<!-- properties reflecting the directory structur of the web application-->
<!-- Resin deployement -->
<!-- =================================================================== -->
<property name="resinDeployDir" location="${resin.server}/${app.name}"/>
<property name="resinLibDir" location="${resin.server}/${app.name}/lib"/>
<property name="resinClassDir" location="${resin.server}/${app.name}/WEB-INF/classes"/>
<!-- =================================================================== -->
<!-- Set class path for the build -->
<!-- =================================================================== -->
<path id="build.classpath">
<!-- <path refid="client.classpath"/> -->
<fileset dir="${tomcat.home}/common/lib/">
<include name="servlet-api.jar"/>
<include name="jsp-api.jar"/>
</fileset>
<fileset dir="${tomcat.home}/webapps/coreServlets/WEB-INF/lib/">
<include name="commons-beanutils-bean-collections.jar"/>
<include name="commons-beanutils-core.jar"/>
<include name="commons-beanutils.jar"/>
</fileset>
</path>
<!-- =================================================================== -->
<!-- Create the file and directory structure of the web app -->
<!-- =================================================================== -->
<target name="init">
<mkdir dir="${src}"/>
<mkdir dir="${src.web}"/>
<mkdir dir="${src.model}"/>
<mkdir dir="${etc}"/>
<mkdir dir="${lib}"/>
<mkdir dir="${web}"/>
<mkdir dir="${classes}"/>
<mkdir dir="${tomDeployDir}"/>
<mkdir dir="${tomLibDir}"/>
<mkdir dir="${tomClassDir}"/>
<mkdir dir="${resinDeployDir}"/>
<mkdir dir="${resinLibDir}"/>
<mkdir dir="${resinClassDir}"/>
</target>
<!-- =================================================================== -->
<!-- OInformation about the file and directory structure of the web app -->
<!-- =================================================================== -->
<target name="about">
<echo> src: ${src} </echo>
<echo> srcWeb: ${src.web} </echo>
<echo> srcModel: ${src.model} </echo>
<echo> etc: ${etc} </echo>
<echo> lib: ${lib} </echo>
<echo> web: ${web} </echo>
<echo> classes: ${classes} </echo>
<echo> tomcatDeployDir: ${tomDeployDir} </echo>
<echo> tomcatLibDir: ${tomLibDir} </echo>
<echo> tomcatLibDir: ${tomClassDir} </echo>
<echo> resinDeployDir: ${resinDeployDir} </echo>
<echo> resinLibDir: ${resinLibDir} </echo>
<echo> resinClassDir: ${resinClassDir} </echo>
</target>
<!-- ================================================================ -->
<!-- Compiles the source code -->
<!-- ================================================================ -->
<target name="compileSrc" depends="init">
<javac srcdir="${src}" destdir="${classes}"
classpathref="build.classpath" debug="off">
</javac>
</target>
<!-- ================================================================ -->
<!-- Deploys the application by copying the class files to the -->
<!-- Tomcat servlet and JPD deploy directory. -->
<!-- ================================================================ -->
<target name="tomcat" description="deployement to tomcat" depends="compileSrc">
<copy todir="${tomDeployDir}">
<fileset dir="${web}">
<include name="**/*.html"/>
<include name="**/*.jsp"/>
</fileset>
</copy>
<copy todir="${tomDeployDir}/WEB-INF">
<fileset dir="${etc}">
<include name="web.xml"/>
</fileset>
</copy>
<copy todir="${tomClassDir}">
<fileset dir="${classes}">
<include name="**/*"/>
</fileset>
</copy>
<copy todir="${tomLibDir}">
<fileset dir="${lib}">
<include name="*.jar"/>
</fileset>
</copy>
</target>
<!-- ================================================================ -->
<!-- Deploys the application by copying the class files to the -->
<!-- Resin servlet and JPD deploy directory. -->
<!-- ================================================================ -->
<target name="resin" description="deployement to resin" depends="compileSrc">
<copy todir="${resinDeployDir}">
<fileset dir="${web}">
<include name="**/*.html"/>
<include name="**/*.jsp"/>
</fileset>
</copy>
<copy todir="${resinDeployDir}/WEB-INF">
<fileset dir="${etc}">
<include name="web.xml"/>
</fileset>
</copy>
<copy todir="${resinClassDir}">
<fileset dir="${classes}">
<include name="**/*"/>
</fileset>
</copy>
<copy todir="${resinLibDir}">
<fileset dir="${lib}">
<include name="*.jar"/>
</fileset>
</copy>
</target>
</project>
the structure of the application is in the file.
if you want, i can you email all the app-source.
cheers,
sergio