Here is the basic layout for a build.xml for the struts appilcations I develop:
<?xml version="1.0"?> <project name="PROJECT NAME" default="PICK_A_TARGET" basedir="./"> <description>FULL PROJECT NAME</description> <!-- ********************** --> <!-- Application Properties --> <!-- ********************** --> <property name="SOME.PROPERTY.NAME" value="COMMONLYUSED"/> ...... <!-- ************************ --> <!-- Jar Directory Properties --> <!-- ************************ --> <property name="log4j.version" value="1.2.9" /> <property name="log4j.dir" location="${lib.dir}/log4j-${log4j.version}" /> <!-- ************** --> <!-- Set Classpaths --> <!-- ************** --> <path id="sourcepath.compile"> <pathelement location="${src.dir}" /> </path> <!-- ********* --> <!-- Clean All --> <!-- ********* --> <target name="clean"> <delete dir="${out.dir}" /> </target> <!-- ******* --> <!-- Compile --> <!-- ******* --> <target name="compile" depends="init"> <javac destdir="${out.dir}\app\WEB-INF\classes" sourcepathref="sourcepath.compile" classpathref="classpath.compile" deprecation="${compile.deprecation}" debug="${compile.debug}" listfiles="${compile.listfiles}"> <src refid="sourcepath.compile" /> </javac> </target> <!-- **************************************************************** --> <!-- COPY OVER ALL OTHER FILES/LIBS INTO THE PROPER WEB-INF STRUCTURE --> <!-- **************************************************************** --> <!-- Copy JSP Pages Over --> <copy todir="${out.dir}\app\WEB-INF\pages"> <fileset dir="${jspPages.dir}" excludes="**/*.keep"> </fileset> </copy> etc... <!-- ********** --> <!-- Distribute --> <!-- ********** --> <target name="dist" > <jar jarfile="${warfile.name}.war" basedir="${out.dir}\app" /> </target> </project> Something along those lines should suffice google and the ant page should suffice To fill in all the blanks, but to review basically set all the properties (dirs, Files, libs, etc.) then move them to the appropriate folders for the WEB-INF, Then compile and make a war file and distribute accordingly. -----Original Message----- From: Session Mwamufiya [mailto:[EMAIL PROTECTED] Sent: Monday, June 11, 2007 2:59 PM To: 'Struts Users Mailing List' Subject: build.xml file for struts 2 Hello, Could someone point me to a working build.xml file that I could use for a simple struts 2 application (helloworld)? I tried the tutorial from roseindia, and that build file doesn't result in a working web app, though ant says that the build was successful. I don't see all of the lib/*.jar files included in the classpath, and it puts the compiled class files in WEB-INF/src/classes instead of WEB-INF/classes; there must be other issues too that I haven't figured out. Could someone point me to a simple working build.xml for struts 2 applications, or a good tutorial that I could use? Thanks, Session A. Mwamufiya Carnegie Mellon University MBA | Tepper School of Business MSE (software eng.) | School of Computer Science T: (412) 508-5455 | [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]