Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Assume we have a few projects, each containing some web resources (e.g., html pages).

 +- web           (war)
 +- web-plugin-1  (jar)
 +- web-plugin-2  (jar)

Let's say web is the deployable war project which depends on the known, but selectable, set of plugins.

What is a good way to setup this using Spring and maven?

  1. Let the plugins be war projects and use mavens poor support for importing other war projects
  2. Put all web-resource for all plugins in the web project
  3. Add all web-resources to the classpath of all jar web-plugin-* dependencie and let spring read files from respective classpath?
  4. Other?

I've previously come from using #1, but the copy-paste semantics of war dependencies in maven is horrible.

share|improve this question

well, i use to work with point 3, definining all dependencies at parent's pom, including dependencies form modules, like that:






everything at pom's parent's it's easy to find what you need. if you need to call some service i i use to create a public jar with functions to call the service like ejb...

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.