IMO there are two bugs. The first one is a bug of Eclipse JSF Faces-config editor that should work with multiple web resource folders and the second one is a bug of Maven Integration for WTP which should add /target/m2e-wtp/web-resources as a second web source folder after /src/main/webapp.
Alexey, m2e-wtp needs to put /target/m2e-wtp/web-resources first as this folder potentially contains filtered (in the maven way) files, existing in src/main/webapp (think web.xml) and WTP always deploys the first file found. Changing the order is a no-go.
WTP 3.2.5/3.3.1 (https://bugs.eclipse.org/bugs/show_bug.cgi?id=353834) added a new tag="defaultRootSource" to virtual folders which should - hopefully - fix this issue. This fix has already been implemented in m2e-wtp 0.14.0 https://issues.sonatype.org/browse/MECLIPSEWTP-168.
m2e-wtp 0.14.0 should be released at about the same time as Indigo SR1, by the end of september 2011. If you can't wait to get your hands on this killer combo, you can get the pre-release versions :
Indigo SR1-RC3 : http://www.eclipse.org/downloads/index-developer.php
m2e-wtp 0.14.0-SNAPSHOT : http://download.jboss.org/jbosstools/builds/staging/m2eclipse-wtp-e37/all/repo/
Guys - you are both right.
But to solve it we need to find the API that must have been introduced in WTP somehow to distinguish which source path is the right one to put files in ? AND support multiple paths...
fbricon, do you know what API WTP uses now to find the right source path?
The defaultRootSource value is added automatically when the JavaEE Facets are installed in WTP 3.3.1/3.2.5/3.4.0
Since m2e-wtp messes with the virtual folders, it calls the internal WTP API directly (via reflection, to keep backward compat. https://github.com/sonatype/m2eclipse-wtp/commit/96acdcafaa233ebf00d3eb8dac00fe7f0d21d616#L5R562)
You can find more info about the upstream change in https://bugs.eclipse.org/bugs/show_bug.cgi?id=121460 and its attached patch : https://bugs.eclipse.org/bugs/attachment.cgi?id=201282&action=diff