I use m2eclipse to import Maven Java projects in Eclipse.
It fails to recognize src/main/webapp
as a source directory.
Graphically in the package explorer (or when I look into Java-Build-Path in the project's properties),
this directory isn't in the list of sources folder (while src/main/java
or src/main/resources
do).
To access it, I have to look directly into the src/ directory, and start unfolding... Not very convenient!
However, if I run maven install
, the resources are copied to the correct directory.
(example : src/main/webapp/index.jsp
to target/mywar/index.jsp
)
- 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?
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).