0

We are planning to build an application which has multiple modules (say [Common which contains Admin, Registration], License Module, Stock Module ). We have planned to use Maven as our build tool

Each module acts like a separate folder(war) where in it has MVC layers in it. Main POM should encapsulate all the modules and form a war file. If a customer doesn't need License Module, i can just unplug the settings and recreate a war file without much effort.

Now i am struggling to find proper example to build a hierarchy(project structure like above)

Could you please guide me on this ?

Chandan
  • 333
  • 1
  • 6
  • 14

1 Answers1

0

You can create a parent project then add the child projects as modules. You can easily comment or delete these modules before building the project.

Here is a basic example.

http://www.concretepage.com/build-tools/maven/parent-pom-child-pom-example

You can get a good idea about parent child maven projects from the following thread as well.

Maven: adding a reference to a parent pom project

Community
  • 1
  • 1
Avinash
  • 4,115
  • 2
  • 22
  • 41
  • Thanks for the hint. Is there any sample links which shows the concrete example which i can have a complete glimpse. – Chandan Nov 28 '16 at 09:14
  • Here is a good example https://docs.oracle.com/middleware/1212/core/MAVEN/real_app.htm#MAVEN8929 Alternatively you can search google with "maven multi module project example" and use what you like. – Avinash Nov 28 '16 at 09:25
  • I cant say it as a maven module. I am looking for something like this [https://coderanch.com/t/569499/Maven-Building-single-war-file] – Chandan Nov 28 '16 at 09:53
  • Chandan, all of them are module, you can write pom to create single or multiple war depending upon your requirement. Just try, I am sure you will be able to do it :) – Avinash Nov 28 '16 at 12:56