I have parent project with all dependencies used in my company with all dependency management, util dependencies, plugins and plugins management. This parent inherit spring-boot-starter-parent as bootstrap parent and aggregate some libs as submodules.
I have in other repos many applications as project which aggregate three standard modules:
- migrations (uses stndard set of libs to perform migrations and plugins to fix db)
- api (uses standard set of vanilla util libs and other api)
- app (uses spring, standard set of spring managed dependencies, spring plugins and others e.g. generate java objects from db)
I don’t want duplicate standard set of dependencies in every application.
I was thinking to create parent-migration, parent-api, parent-app and use it in every application project submodules,
but aggregated submodule cannot inherit other parent.
I was thinking to import parent like this, but scope “import” imports “dependency management” section only, without declared dependencies, plugins, properties, etc.
How can I mix aggregation and inheritance in maven, or resolve this problem in other way?