How can I configure a Java Dynamic Web Project in Eclipse so the WEB-INF/lib folder is located in a sub folder?
For example, say I wanted my "lib" folder to be located here:
src/main/webapp/WEB-INF/lib
and my webapp root is here:
src/main/webapp/
How do I configure this in Eclipse? I know I could just "add the jars", but I'd like them to be organized under my "Web App Libraries" section in the Libraries section of my app's build path.
What I've tried:
I've tried adding "Web App Libraries" by doing the following, but it doesn't detect the jars in my "src/main/webapp/WEB-INF/lib" folder:
- Project | Properties | Java Build Path | Libraries | Add Library | Web App Libraries
I've also ensured that the root of my web app (src/main/webapp) is in my "Source folders on Build Path" as well, with no luck:
- Project | Properties | Java Build Path | Source | Source folders on Build Path
I know it can be done, as I've got another project that has this configured and working, but I'm not sure how to duplicate the configuration.
Thanks!
Turns out that I could get this to work by adding the following file to my project:
.settings/org.eclipse.wst.common.component
I found this out by creating a brand new "Dynamic Web Project":
Note: You may also need to add "Web App Libraries" to your project as detailed in my question.