Ant中的build.xml
<?xml version= "1.0 "?>
<project name= "springapp " basedir= ". " default= "usage ">
<property file= "build.properties "/>
<property name= "src.dir " value= "src "/>
<property name= "web.dir " value= "war "/>
<property name= "build.dir " value= "${web.dir}/WEB-INF/classes "/>
<property name= "name " value= "springapp "/>
<path id= "master-classpath ">
<fileset dir= "${web.dir}/WEB-INF/lib ">
<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= "${build.dir} "/>
</path>
<target name= "usage ">
<echo message= " "/>
<echo message= "${name} build file "/>
<echo message= "----------------------------------- "/>
<echo message= " "/>
<echo message= "Available targets are: "/>
<echo message= " "/>
<echo message= "build --> Build the application "/>
<echo message= "deploy &