I had the same experience. Just to illustrate here is my build target, quite straightforward:
<target name="build-live-war"> <war duplicate="preserve" destfile="${build.dir}/${liveWarName}.war" webxml="${basedir}/live-conf/web.xml"> <metainf dir="${basedir}/live-conf"> <include name="context.xml"/> </metainf> <classes dir="${contextHome}/WEB-INF/classes" /> <classes dir="${basedir}/live-conf"> <include name="*.properties"/> </classes> <fileset dir="${contextHome}"> <include name="*" /> <include name="css/*" /> <include name="images/*" /> <include name="samples/*" /> </fileset> <webinf dir="${contextHome}/WEB-INF"> <include name="admin/*"/> <include name="images/*"/> <include name="*.page" /> <include name="*.application" /> <include name="*.jwc" /> <include name="*.html" /> <include name="*.xml" /> <include name="*.css" /> <exclude name="web.xml" /> </webinf> <lib dir="../lib/base"><include name="*.jar"/></lib> <lib dir="../lib"> <include name="bluprinted-commons.jar"/> <include name="bluprinted-personal.jar"/> <include name="bluprinted-simppler.jar"/> </lib> </war> <zip destfile="${build.dir}/blingon-portal-src.jar" basedir="${src.api}"/> <copy todir="../lib"> <fileset dir="${build.dir}"><include name="*.jar"/><include name="blingon*.zip"/></fileset> </copy> <copy tofile="../lib/blingon-portal-build.xml" file="${basedir}/build.xml"/> </target> "Rob Hills" <[EMAIL PROTECTED]> skrev i en meddelelse news:[EMAIL PROTECTED] > Hi Henrik, > > On 4 Dec 2005 at 4:38, hv @ Fashion Content wrote: > >> > context.xml: >> > <Context docBase="ROOT" reloadable="true"></Context> >> >> Where is this context.xml file located? The docBase attribute must >> not be used unless the <Context> tag is inside server.xml or >> conf/Catalina/<host_name>/<app_name>.xml; the only time a file named >> context.xml is valid is inside the META-INF directory of a webapp. >> >> it is in META-INF. Ok, so I tried to remove the docBase. Made no >> difference whatsoever. > > Please excuse the brief digression into the Ant world, but it is about > building WAR files for Tomcat... > > Another gotcha I found when putting together my Ant war-build scripts is > that initially I just created a (working) web app on my > development machine file system and then "zipped" that all up into a WAR > file using the Ant WAR task. However, I discovered after > much fiddling and googling that you can't just zip in the "special" > folders (WEB-INF, META-INF, WEB-INF/lib etc.) you have to exclude > them from the files being zipped into the WAR file and then specify the > files to go into them via the <lib ..> <metainf ..> and <webinf ..> > enclosed tags. > > Never worked out what structural difference this made to the WAR file, > since it looked the same as my previous ones when I unzipped it, > but functionally it made the difference between it working and not working > with Tomcat (WRT auto-deploy anyway). > > Check your Ant documentation of the WAR task for details. > > HTH, > > Rob Hills > MBBS, Grad Dip Com Stud, MACS > Senior Consultant > Netpaver Web Solutions > Tel: (08) 9485 2555 > Mob: (0412) 904 357 > Fax: (08) 9485 2555 --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]