<? XML version = "1.0"?>
<Project name = "strutstest" basedir = "." default = "compile">
<! -- <Property file = "build. properties"/> -->
<Property name = "tomcat. Home" value = "C:/program files/Apache Software Foundation/tomcat 5.0"/>
<Property name = "src. dir" value = "src"/>
<Property name = "Web. dir" value = "Web"/>
<Property name = "Lib. dir" value = "lib"/>
<Property name = "Page. dir" value = "$ {web. dir}/pages"/>
<Property name = "class. dir" value = "$ {web. dir}/WEB-INF/classes"/>
<Property name = "name" value = "strutstest"/>
<Path id = "Master-classpath">
<Fileset dir = "$ {Lib. dir}">
<Include name = "*. Jar"/>
</Fileset>
<! -- We need the servlet API classes: -->
<! -- For Tomcat 4.1 Use servlet. jar -->
<! -- For Tomcat 5.0 use servlet-api.jar -->
<! -- For other app server-check the docs -->
<Fileset dir = "$ {tomcat. Home}/common/lib">
<Include name = "servlet *. Jar"/>
</Fileset>
<Pathelement Path = "$ {class. dir}"/>
</Path>
<Target name = "compile" Description = "compile main source tree java files">
<Mkdir dir = "$ {class. dir}"/>
<Javac destdir = "$ {class. dir}" target = "1.3" DEBUG = "true"
Deprecation = "false" optimize = "false" failonerror = "true">
<SRC Path = "$ {SRC. dir}"/>
<Classpath refID = "Master-classpath"/>
</Javac>
</Target>
<Target name = "deploy" depends = "compile" Description = "deploy application">
<Echo message = "Deploy all file in the project to Tomcat."/>
<Copy todir = "$ {tomcat. Home}/webapps/$ {name}" preservelastmodified = "true">
<Fileset dir = "$ {web. dir}">
<Include name = "WEB-INF/**"/>
</Fileset>
</Copy>
<Copy todir = "$ {tomcat. Home}/webapps/$ {name}" preservelastmodified = "true">
<Fileset dir = "$ {page. dir}">
<Include name = "**/**"/>
</Fileset>
</Copy>
<Copy todir = "$ {tomcat. Home}/webapps/$ {name}/WEB-INF/lib" preservelastmodified = "true">
<Fileset dir = "$ {Lib. dir}">
<Include name = "*. Jar"/>
</Fileset>
</Copy>
<Copy todir = "$ {tomcat. Home}/webapps/$ {name}/images" preservelastmodified = "true">
<Fileset dir = "$ {web. dir}/images">
<Include name = "**/**"/>
</Fileset>
</Copy>
<Copy todir = "$ {tomcat. Home}/webapps/$ {name}/scripts" preservelastmodified = "true">
<Fileset dir = "$ {web. dir}/scripts">
<Include name = "**/**"/>
</Fileset>
</Copy>
<Copy todir = "$ {tomcat. Home}/webapps/$ {name}/styles" preservelastmodified = "true">
<Fileset dir = "$ {web. dir}/styles">
<Include name = "**/**"/>
</Fileset>
</Copy>
</Target>
<Target name = "deploy-web" Description = "deploy only web to servlet container's deploy directory">
<Echo message = "Deploy all static file to Tomcat."/>
<Copy todir = "$ {tomcat. Home}/webapps/$ {name}">
<Fileset dir = "$ {page. dir}">
<Include name = "**/**"/>
</Fileset>
</Copy>
<Copy todir = "$ {tomcat. Home}/webapps/$ {name}">
<Fileset dir = "$ {web. dir}">
<Include name = "WEB-INF/classes/**"/>
</Fileset>
</Copy>
</Target>
<Target name = "deploy-classes" Description = "deploy only web to servlet container's deploy directory">
<Echo message = "deploy classes to Tomcat."/>
<Copy todir = "$ {tomcat. Home}/webapps/$ {name}/WEB-INF" preservelastmodified = "true">
<Fileset dir = "$ {web. dir}">
<Include name = "WEB-INF/classes/**"/>
</Fileset>
</Copy>
</Target>
<Target name = "undeploy" Description = "undeploy war file to servlet container's deployment dir">
<Echo message = "undeploying webapp from Tomcat"/>
<Delete dir = "$ {tomcat. Home}/webapps/$ {name}"/>
</Target>
<Property name = "class. Name" value = "com. wxt. Reports. jasperapp"/>
<Property name = "file. Name" value = "firstjasper"/>
<Property name = "classes. dir" value = "$ {class. dir}"/>
<Property name = "Lib. dir" value = "$ {web. dir}/WEB-INF/lib"/>
<Property name = "fonts. dir" value = "fonts"/>
<Path id = "classpath">
<Pathelement location = "./"/>
<Pathelement location = "$ {classes. dir}"/>
<Pathelement location = "$ {fonts. dir}"/>
<Fileset dir = "$ {Lib. dir}">
<Include name = "**/*. Jar"/>
</Fileset>
</Path>
<! --
Deletes all the generated files.
-->
<Target name = "clean">
<Delete dir = "$ {classes. dir}"/>
</Target>
</Project>