Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 335748

Summary: Custom context hot removal causes war redeploy (jetty-deploy)
Product: [RT] Jetty Reporter: Davide De Rosa <keeshux>
Component: serverAssignee: Greg Wilkins <gregw>
Status: RESOLVED WONTFIX QA Contact:
Severity: minor    
Priority: P3 CC: jetty-inbox
Version: unspecified   
Target Milestone: 7.2.x   
Hardware: PC   
OS: All   
Whiteboard:

Description Davide De Rosa CLA 2011-01-28 19:42:46 EST
Build Identifier: 20100917-0705

I noticed this inspecting MonitoredDirAppProviderRuntimeUpdatesTest.testAfterStartupThenRemoveContext(). Given a "contexts/foo.xml" pointing to a "webapps/foo.war", WebAppProvider.Filter prevents foo.war being deployed in a new context as long as foo.xml exists. Therefore, once foo.xml is removed foo.war gets redeployed alone.

There's a commented FIXME task in the test highlighing the issue, but I post this as Minor as I don't know the intended behaviour. Should the deployer delete foo.war as well? If so, I could upload a patch.

Reproducible: Always

Steps to Reproduce:
1. Create your foo.war web application
2. Create a foo.xml context configuration file defining a WebAppContext pointing to foo.war
3. Copy foo.war to "webapps" and foo.xml to "contexts" under the jetty distribution
4. Delete foo.xml
5. foo.war redeploys alone
Comment 1 Greg Wilkins CLA 2011-01-30 23:43:19 EST

The current behaviour is correct, but a little undesirable.
I think it is probably the best we can do for a one-size-fits all distribution and also to keep with existing doco etc.

For a non-default deployment, the solution is to either:

a) not use the webapp and context deployers/providers at the same time
b) don't use the webapps directory as the location of wars deployed by context/foo.xml


regards