-
Task
-
Resolution: Done
-
Medium
-
None
-
None
-
None
-
Policy Beijing 3 - 2-13
In order to align consistency between projects, we will consolidate project dependencies upwards in the hierarchy for each project. Subsequently we will then request a parent repo that can hold common dependencies across projects to better manage these.
TODO: I will try to come up with some guidelines on what qualifies.
Guidelines:
- Parent project pom.xml should have dependencyManagement section
- If more than 1 sub-module shares a dependency, then that should be declared in parent's dependencyManagement section
- Should use properties to declare versions - makes it easier to find. Property declaration organization:
- maven build properties
- dependency version properties - organized for the moment like this to see consistencies/inconsistencies:
- same version
- differing version
- specific to project itself
- Dependencies specific to a sub-module can use optional property to declare version. Not necessary.
- If a version needs to be overridden due to technical reason, there should be a comment indicating reasons why.
- sub-modules should organize dependencies in the following order:
- parent managed dependencies
- other sub-module dependencies
- internal sub-module dependcies
Guidelines for potential policy parent.pom (if we choose to go there) :
- Parent project should have dependencyManagement section
- If more than 1 repository shares a dependency, then that dependency should be declared in the policy/parent/pom.xml dependencyManagement section