xml
To create Build.xml in eclipse, select File- Exports, a popup window is opened select Ant
Buildfiles and click next button, then select the project and click finish. Now you can see
build.xml file.
<target name="clean">
<delete>
<fileset dir="E:/USC/workspace/USC_ERP_RECKON">
<include name="**/*.class"/>
<exclude name="**/*.properties"/>
</fileset>
</delete>
<delete dir="work"/>
</target>
• In the target tag we will give the name for the war file. And in the depends, we
have to specify on which the war file is depended on, here it is depending on
compilation.
• In war tag we will specify destfile & webxml. At destfile we give the path where
we want to store our war file and at webxml we will give the path of web.xml.
• In Fileset tag we give the specified path, from where we want to perform our
operations.
• In exclude tag we will specify all the files which we don’t want to include in the
creation of war file.
• In the classes tag we will give the path of the classes directory.
<target name="deploy">
<copy todir="C:/Program Files/Apache Software Foundation/Tomcat 5.0/webapps">
<fileset dir="E:/USC/workspace/USC_ERP_RECKON" includes="usc103.war"/>
</copy>
</target>