tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Christmann <>
Subject Re: Problems with deployment process using Eclipse + Ant + Tomcat
Date Wed, 01 Dec 2004 15:44:56 GMT
We use ant build scripts (launched from eclipse, anthill, command 
prompts, just about anywhere) to deploy webapps to Tomcat and it works 
fine for us.  But we did have difficulties when we started doing so.  We 
are currently using Tomcat 5.0.28; we've done it for a long time on 
Tomcat 4.1; we've tested it on Tomcat 5.5, but I can't say that it 
worked - we had other issues (unrelated to ant or Tomcat) that got in 
the way.

Its been a while since I went through these problems, but here's my 

a) There are several tasks in the catalina-ant.jar.  In particular, 
though, there are two different sets of tasks that can be used for 
deploying webapps: <install>/<remove> and <deploy>/<undeploy>.  You

cannot <remove> a <deploy>'d app nor can you <undeploy> an <install>'d


I don't fully recall the difference between those sets of tasks, but we 
discovered that the <deploy>/<undeploy> tasks worked better for us.

b) We change the unpackWars attribute in the <Host> element of the 
server.xml from true (its default value on a Windows installation) to 

Without this change, Tomcat unpacked the deployed webapp, which caused 
difficultied with the removal (files weren't removed) which then 
prevented redeployment.

c) Side note about your ant scripts:  your "deploy" target uses a bunch
of ant calls to do different things (build, war, tomcat_deploy and
email).  In each case you are passing inheritrefs=true and
inheritall=true and calling targets in the same build file.  You'd
probably be better off just doing this as dependencies instead:

   <target name="deploy" depends="init, build, war, deploy_tomcat, email"/>

I hope that helps,


Paul Christmann
Prior Artisans, LLC

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message