]
Fred Bricon resolved JBIDE-9454.
--------------------------------
Resolution: Done
The web.xml modification has been completely disabled. Will open a new JIRA to keep track
of the necessity of automatically adding the Faces Servlet, when the upstream issue is
solved.
Adding the JSF Facet (< 2.0) completely overwrites the project
web.xml with m2e-wtp 0.13.x
------------------------------------------------------------------------------------------
Key: JBIDE-9454
URL:
https://issues.jboss.org/browse/JBIDE-9454
Project: Tools (JBoss Tools)
Issue Type: Bug
Components: maven, UpStream
Affects Versions: 3.3.0.M2
Reporter: Fred Bricon
Assignee: Fred Bricon
Labels: JSF, maven, upstream, web_xml
Fix For: 3.3.0.M3
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.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: