Maven Multi Module benefits over simple dependency

前端 未结 4 852
暗喜
暗喜 2021-01-30 13:06

I have some years of experience with maven projects, even with multi modules ones (which has made me hate the multi modules feature of maven (so the disclaimer is now d

4条回答
  •  北海茫月
    2021-01-30 13:25

    Multi modules can help you with re-use your code. It's one of the best benefits you'll feel in work.

    Imagine if you have 3 web projects with a security layer, You'll have to copy paste your code 3 times and trying connect it with each project.

    But what if you create a security module a project with a specific job. It'll be easy to use it by injecting it to your app and then boom it works.

    Also as mentioned in @ben75's answer the one maven build command and the correct order of building all your used jars. You'll think no more about which depends on another.

提交回复
热议问题