build automation with tomcat and ant tool

build automation with tomcat and ant tool

build.xml

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE xml>
<project name="cert" default="war" basedir=".">
 <description>Application build file</description>

 <target name="war">
  <mkdir dir="dist" />

  <war destfile="dist/cert.war" webxml="WebContent/WEB-INF/web.xml" >
   <fileset dir="WebContent" />
   <classes dir="WebContent/WEB-INF/classes" />
  </war>

  <copy todir="E:\driveE\softwares\tomcat7\webapps" flatten="true">
   <resources>
    <file file="dist/cert.war" />
   </resources>
  </copy>
 </target>
</project>