Multi-module web project with Spring and Maven
Posted
by
Johan Sjöberg
on Programmers
See other posts from Programmers
or by Johan Sjöberg
Published on 2013-06-30T13:46:11Z
Indexed on
2013/06/30
16:27 UTC
Read the original article
Hit count: 479
Assume we have a few projects, each containing some web resources (e.g., html pages).
parent.pom
+- 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
?
- Let the plugins be
war
projects and use mavens poor support for importing otherwar
projects - Put all web-resource for all plugins in the
web
project - Add all web-resources to the classpath of all
jar
web-plugin-*
dependencie and let spring read files from respective classpath? - Other?
I've previously come from using #1
, but the copy-paste
semantics of war
dependencies in maven is horrible.
© Programmers or respective owner