Example of the Ant war task (sample Ant build script)

Ant war task example: Here's another snippet of code from my most recent Ant build scripts. This example code shows how I use the Ant war task to create my war file:

<!-- with all resources in place, create the war file -->
<war destfile="${package.file}" 
     webxml="${temp.dir.web-inf}/web.xml" 
     basedir="${temp.dir}"
     excludes="${lib.dir}/servlet-api.jar">
  <fileset dir="${pages.dir}"/>
  <lib dir="${lib.dir}" />
  <classes dir="${temp.dir.classes}" />
</war>

As with my other examples, I know that I've mixed some variables in here, but I'm hoping the names will be meaningful enough that you'll be able to use this sample code in your own build scripts and Java projects. If it helps to know it, this sample code comes from a working, "real world" project.