I am having problem generating the war file correctly with ANT's build.xml for Struts2.
My problem was for the struts.xml, I can't seem to be able to put it to the right place even though I tried to use the tag.
What is the correct way of putting it into the war file? Here is my code (removed the tag as it wasn't working):
<?xml version="1.0" encoding="UTF-8"?>
<project name="Struts2Proj" default="war">
<property name= "build.dir" value="build"/>
<property name= "src.dir" value="src"/>
<property name= "lib.home" value="WebContent/WEB-INF/lib"/>
<target name="clean" description="Clean output directories">
<delete>
<fileset dir="classes">
<include name="**/*.class"/>
</fileset>
</delete>
</target>
<target name="build" description="Compile source tree java files">
<mkdir dir="${build.dir}"/>
<javac src ="${src.dir}" destdir="${build.dir}" >
<classpath>
<path>
<fileset dir="${lib.home}" />
</path>
</classpath>
</javac>
</target>
<target name="war">
<war destfile="Struts2Project.war" webxml="WebContent/WEB-INF/web.xml">
<fileset dir="WebContent">
<include name="**/*.*"/>
</fileset>
<lib dir="${lib.home}" />
<classes dir="build/classes"/>
</war>
</target>
</project>