Best Practices for Structuring Maven Projects and Modulesfleeting
- External reference: https://docs.microfocus.com/itom/Operations_Orchestration:10.80/Develop/Best_practices_for_structuring_maven_projects_and_modules
Best practices for structuring maven projects and modules
The best practice used when building Content Packs is called Maven Bill of Materials (BOM), where there is a root Maven project (pom.xml) that defines common dependencies, versions, properties, etc. and the other Maven projects depend on the root Maven Project. A BOM dependency model keeps track of version numbers and ensures that all dependencies (both direct and transitive) are at the same version.
The parent project pom.xml should list the child modules and should contain the common set of third party dependencies all the plugins use, common Maven properties, Source Control Management System configurations and the common Maven plugins definitions used for building the Maven modules
Make sure that your build components are stable (all unit and integration tests pass). Use the dependencyManagement section in the project pom in order to control the dependency versions.