Why and when to create a multi-module Maven project?

前端 未结 4 1455
渐次进展
渐次进展 2021-02-04 09:46

I have a general question about Maven\'s multi module project. When and why to go for it?

4条回答
  •  野性不改
    2021-02-04 10:14

    There are some more use cases in which I will recommend using multi module maven project:

    1. Your modules share the same dependencies, in this case you will specify all the dependencies in the main pom, and all the modules can enjoy it. ( No need to specify for each module the same dependencies.)

    2. If you need to perform operations on multiple projects all together. ( I personally use it) , I create a package from all my projects, and ship it to a costumer, so I build them using the main pom , and package them as zip file using other maven plugin.

提交回复
热议问题