This bug is an upstream issue (https://bugs.eclipse.org/bugs/show_bug.cgi?id=353834), I discovered it while investigating on JBIDE-6228.
Since m2e-wtp 0.13.0, a typical maven-powered dynamic web project defines 2
folders in its .component :
1 - target/m2e/web-resources/ : contains generated files
2 - src/main/webapp/ : contains user resources under SCM
Both folders are deployed via the WTP server adapter. The target folder is put
in first position because we sometimes need to override user resources (ex.
dynamically replacing placeholders in configuration files) and WTP deploys the
first resource it finds.
When you add the JSF Facet to such project, and ask to add the faces servlet to
the web.xml, the JSFFacetInstallDelegate pretty much does the following :
- looks for the first folder found in .component (finds target/*)
- finds no web.xml so generates an empty webxml model
- serialize the new model to the web.xml it finds in src/main/webapp
=> the user web.xml is then totally overwritten.
Easiest solution is to disable the Faces Servlet configuration for all JSF projects. That'd also fix JBIDE-6228.
Twisted hack would be to change the configuration order in .component before and after changing adding the JSF Facet
Time consuming solution would be to disable the Faces Servlet configuration during Facet install then, rewrite the web.xml update logic to add the missing Faces servlet config.
- is related to
-
JBIDE-6228 "JBoss Maven Seam Integration" modifies web.xml during project import
- Closed