I have a module with two web facets A and B. Facet A contains all jsp files and a my.css file. Facet B is used for deploying the same jsps to a different server with different style so it contains only my.css file.
In the project options, facet options you can define Web Resource Directories. For facet B I have the following:
directory .../B, path relative to depl. root /
directory .../A, path relative to depl. root /
According to previous post in the forum
http://www.intellij.net/forums/thread.jspa?forumID=27&threadID=271788
IDEA follows the order of the directories defined in the Web Resource Directories when building the project. The .../B/my.css is copied first, the .../A is copied second and the existing files are not overwritten. This works OK.
Then I generate the ant files in menu Build, Generate Ant Build. In the generated file the B and A have incorrect order. The .../A is copied first and the .../B second. This behaviour effectively ruins my build.
Original report in forum
http://www.intellij.net/forums/thread.jspa?forumID=27&threadID=272456