I have a spring-based Web Service. I now want to build a sort of plugin for it that extends it with beans. What I have now in web.xml is:
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/classes/*-configuration.xml</param-value>
</context-param>
My core app has main-configuration.xml
which declares its beans. My plugin app has plugin-configuration.xml
which declares additional beans. Now when I deploy, my build deploys plugin.jar
into /WEB-INF/lib/
and copies plugin-configuration.xml
into /WEB-INF/classes/
all under main.war
.
This is all fine (although I think there could be a better solution), but when I develop the plugin, I don't want to have two projects in Eclipse with dependencies. I wish to have main.jar
that I include as a library. However, web.xml
from main.jar
isn't automatically discovered. How can I do this? Bean injection? Bean discovery of some sort? Something else?
Note: I expect to have multiple different plugins in production, but development of each of them will be against pure main.jar
Thank you.