Reputation: 3730
I just started to play around with spring roo for the first time, first impression was quite exciting. Currently I'm struggling to create multi-module project hope you guys can help me out.
Lets say I have parent POM and 2 Jar projects and 1 war projects. Lets name them as follows.
All jars and war file I need them to arrange at peer level inside parent project. So all three projects should have a single parent which is the main POM.
Dependencies should be - Web depends on >> Services Impl depends on >> Services API
I don't know much about how spring roo multi-module functionality can help me to achieve this. Waiting for your expertise. cheers.
Upvotes: 2
Views: 1658
Reputation: 41126
Spring Roo supports multi-module Maven projects since version 1.2.0, check out Spring Roo - Reference Documentation.
In command prompt, you can simply run:
roo script multimodule.roo
This creates a sample multi-module project, which has the following directory structure:
my-project/
pom.xml -- <packaging>pom</packaging>
core/
pom.xml -- <packaging>jar</packaging>
src/
ui/
pom.xml -- <packaging>pom</packaging>
mvc/
pom.xml -- <packaging>war</packaging>
src/
The sub-module mvc project has sub-module core as dependency in its pom.xml. Once you create this sample project, you can work on it and manually change its structure for your purpose, before attaching it to an IDE like Eclipse.
Spring Roo also provide some built-in commands help you create new sub-module project and manage inter-dependency, check out the features and limitations in reference documentation.
Hope this helps.
Upvotes: 2