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 this forum
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.
I can fix it manually in ant file but it will be overwritten next time I generate. I think this is a bug.