This is on what version of tomcat ?
Which server type are you using from Eclipse ?
btw. normal redeployment only happen if you touch the descriptors ...
I am using tomcat 6.0.16. Server type through WTP tools is Apache Tomcat v6.
I am not touching the descriptors but hmmmm, how do I monitor that to find out which plugin might be doing that. I did uncheck the setting "Update Context Paths" thinking maybe that would help but it didn't".
oh, and this is jboss tools 3.1.0 M3 ;).
I will go ahead and try out adding a server through jboss tools jboss server view today and deploying to that server instead to see if that helps (though we do have another project that does seem to be working ok and does not redeploy when I touch class files so I am confused as to what is different between the two projects).
so, I tried jboss tools server view(by adding my tomcat server) and I still get redeploy on every class change. Some interesting things to note though are below....
I configure the tomcat instance to be in a new tomcatInst directory and change wtpwebapps to webapps. I think start it up, change my class file and the redeploy happens(I mean I see hibernate re-init, seam, everything). I then check the timestamp on my web.xml file. It has NOT changed. It is still yesterday's timestamp. Any ideas why something would hot deploy in tomcat when the web.xml file has not change in webapps/mainapp/WEB-INF/web.xml....is this the wrong file to look at? Not sure why this is happening at all now. Could it be a jboss config or a WTP config problem?
Well, it turns out, on my one project, I had the "Server Modules without Publishing" checked. Once I unchecked that, that project also gets redeployed every time I touch any class file. the class files timestamp changes but the web.xml timestamp never changes and is never touched and this causes a redeploy.
I am very confused. I distinctly recall, you had ot touch the web.xml file to cause a redeploy in tomcat but that is not what I am seeing at this instant.
I don't like how JBoss tools or WTP modifies my tomcat config files!!! Somehow the MyEclipse developers figured out a way to pass stuff in on the command line and re-use the same tomcat instance I use. That rocked because then I could go run ./catalina.sh run after I deployed with eclipse and debug eclipse deployment problems where eclipse was not deploying a file I needed or something. It was very nice feature. Should I add a feature request there?
Well, the work around is to check "Server Modules without Publishing" but I don't like doing that.
OH, another feature I LOVE in myeclipse is checking the "Merge all dependent projects into the WEB-INF/classes folder" as this allows me to publish everything and still do hot swap on the dependent projects. I loved that feature....can I request that one as well?
Are you not seeing constant redeployment in tomcat when you change a java file???
You need to configure Tomcat to not redeploy the application when changing WEB-INF/classes.
<Context debug="0" reloadable="false"> </Context>
or add the attribute reloadable="false" if you already have context.xml.
You also can change Tomcat's global context.xml (TOMCAT_HOME/conf/context.xml).
As to "Merge all dependent projects into the WEB-INF/classes folder", I think that the Tomcat adapter doesn't support it. The Tomcat adapter is a WTP adapter and isn't related to JBoss Tools. JBoss Tools adapters support this feature for Web and EJB projects (they are deployed in an exploded form and are hot swappable).
thanks, that seemed to work great!!!
"I don't like how JBoss tools or WTP modifies my tomcat config files!!!"
We don't modify any of your tomcat config files, neither do WTP afaik.
Snjezana's answer should be enough ;)
"Merge all dependent projects into the WEB-INF/classes folder"
That sounds like a tomcat specific request - JBoss supports exploded deployment outofthebox so not sure such option is needed ?
Just to chime in, what Sjnezana said is correct. The Tomcat adapter is not ours and we cannot control any of its behaviour really. Larry Isaacs is the guy in charge of that and you can either file a bug / feature request on eclipse bugzilla or WTP forums / mailing lists for any suggestions you have on Tomcat.