src/main/webapp directory not recognized by Eclipse
Instead of adding /src/main/webapp as a source folder in the java build path, add it as a folder to include in the deployment assembly:
MyProject -> properties -> Deployment Assembly: Add "/src/main/webapp" deploys to "/"
- Is this a correct behavior ? (I was thinking it could be treated as other resources ...)
- Could I fix it?
- I wonder if there are other drawbacks for this situation, that I would not be aware of right now?
- Yes, to me this is the correct behavior.
- It doesn't really make sense for src/main/webapp to be a source folder, it doesn't contain compilable source files.
- I don't know. I guess it depends on your expectations :)
That said, m2eclipse made a contribution that allows to make src/main/webapp
available at the top level with a specific "Web Resources" label, something like this:
This could be a solution for your concern (the not convenient folding).