I was looking at some open source projects and noticed they have a setup like:
/app1/pom.xml
/app1/app1-mod1/pom.xml
/app1/app1-mod2/pom.xml
/app1/app1-mod3/pom.xml
So there is a master pom, and then all the modules have pom.xml also.
So in my situation I have the following:
1. spring mvc application
2. spring mvc application
3. shared model/db layer
So I guess I should be following the multiple pom.xml setup?
If yes, how will I get #3 to build before #2 and #1.
Should I be dropping down to ant to perform the actual build?
Any tutorials that you guys know of to walk me through this process?
I’m coding in IntelliJ.
Maven will calculated the dependencies by itself it you setup your POMs so that
module #1 and #2 both depend on #3 maven will build #3 first without any additional configuration required.
The layout you use (multi module) is also required for the release plugin.
See also A Multi-module Project