Scenario : I want to create a common project for all my mule applications that can do the following:
- Aggregate all Mule 4 component configurations for child projects (like Salesforce Config, DB Config etc)
- Aggregate all maven dependencies for any jar used in child projects for example mssql JDBC maven dependency etc.
Point 1 can be handled by Mule 4 domain project and Point 2 can be handled by a Maven Parent project.
As per Mule Documentation : https://docs.mulesoft.com/mule-runtime/4.3/shared-resources#associate-a-mule-app-with-a-domain-using-studio. we have to refer a domain project by specifying it as a normal dependency.
Can we instead define it as a parent pom?
I don't recommend to do that. A parent pom has a different intention, and mixing them might be confusing to developers. It might also confuse the Mule Maven Plugin when building applications, which doesn't provide any support for this kind of scenarios.