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

前端 未结 4 1456
渐次进展
渐次进展 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:01

    The answer of @Esko Luontola

    Splitting the project into multiple modules is useful for example if the modules need to be deployed separately,..

    could be misinterpreted. If you have modules which will be deployed separately, it's exactly the opposite. In such case, you should never create a multi-module build. This should be done via simple separate maven projects.

    The idea of a multi-module build is if you have modules which belong together like an ear project which usually consists of several others like client, server, ejb, war, etc. This is usually handled via a multi-module build which means all modules have the same version number but can be accessed and used by other separately.

提交回复
热议问题