How to install all dependencies of sub-modules in Main module

We have multiple ways to achieve it.