Maven Multi Module benefits over simple dependency

前端 未结 4 857
暗喜
暗喜 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:22

    I think you are correct in that most project that use multi modules, actually don't need them.

    At where I work we use multimodule projects (and I think that for a good reason). We have something similar to a service oriented architecture, so each application

    • A client module
    • An interface module (which has shared objects between the client and implementation)
    • an implementation module
    • a war module

    I agree that putting that implementation and war module in the same actual module would be ok, but the (arguably) benefit of this is that is very clear division between the classes that solve the problem and how the application communicates with the external world.

    In previous projects that involved just a web application, I've tried to put everything in the same module, as it made testing easier, given the modules I was using.

提交回复
热议问题