I followed the following steps
Historically, tomcat has never updated the exploded directory when you just drop in a new jar, at least for me. I always assumed this to be a bug, but never looked into it as there is a simple solution. Both of these should work fine:
As I use maven to generate my builds in tomcat inside a ubuntu box, I have a script called
install_wars.sh
With the following content:
mvn clean install
service tomcat7 stop
find /var/lib/tomcat7/webapps/ -mindepth 1 -maxdepth 1 -type d -exec rm -rf {} \;
find . -name *.war -exec cp {} /var/lib/tomcat7/webapps/ \;
service tomcat7 start
You may want to change the path and maven commands accordingly.
The tomcat stop/start are there to avoid any memory leaks that can make the application slow after several redeploys.
Yes the exploded directory ought to be updated, however you don't need to stop Tomcat for this to work - it will work with Tomcat running. Can you try it again without stopping Tomcat in between the update?
Also I use the built-in Manager application which allows me to update war files anywhere in the domain without being root (or apache or whatever tomcat is running as). This is very convenient and can be built into an Ant script.
I usually set the autodeploy in server.xml to false. This allows me to drop the new war and restart tomcat without having to deal with the corresponding directory.
In my case i name artifact
ROOT.WAR
but should be
ROOT.war
Cheers!
Add autoDeploy = true. Works for me
<Host name="localhost" appBase="webapps" unpackWARs="true" autoDeploy="true">