import-bot (20212) [Avatar] Offline
#1
[Originally posted by mtedone]

Hi, this question seems to very a bit silly as I'm running my builds since
months succesfully now, but tonight a question came to my mind: I'm using the
war/unwar task to deploy a war file under Tomcat.

My war task looks like the following:

<target name="prod-war" >
description="Creates the war file ready to be deployed" >

<war destfile="${dist.bin.dir}/${ant.project.name}.war">
webxml="${xml.dir}/web.xml"
index="true"
manifest="${manifest.path}"
update="true">

<fileset dir="${web.dir}" includes="**/*.*" />
<webinf dir="${xml.dir}" >
excludes="META-INF/*.xml"
includes="**/*.*" />
<webinf dir="${tld.dir}" includes="**/*.*" />
<webinf dir="${dtd.dir}" includes="**/*.*" />
<classes dir="${txt.dir}" includes="**/*.properties" />
<lib dir="${lib.dir}" includes="**/*.jar" />
<lib dir="${dist.bin.dir}">
includes="${ant.project.name}_${project.version}.jar" />
</war>
</target>

and my unwar task looks like the following:

<unwar>
dest="${catalina.dist.app}"
overwrite="true"
src="${dist.bin.dir}/${webapp.name}.war" />

So far so good: my application folder is created under Tomcat with
WEB-INF/classes and WEB-INF/lib (the latter containing a jar with the
application's logic) and all the JSP and HTML pages in place.

I had a look at the war file and inside it doesn't contain any WEB-INF/classes
and WEB-INF/lib folder. So my question is: does the war task keep in memory
the information provided with <webinf>, <classes>, and <lib> elements? If the
war file doesn't contain those folders, but they are present under the newly
created folder under Tomcat, how is it possible? It means (and actually it is
so) that my war file is not hot deployable.

Thanks,

Marco
import-bot (20212) [Avatar] Offline
#2
Re: War task
[Originally posted by erikhatcher]

Sorry for the delayed reply. I'm a bit confused. The <war> task you showed
will in fact contain
WEB-INF/lib and WEB-INF/classes "directories". Why you are not seeing it is
the issue here. Are
you using WinZip to look in there? Or what tool?