Dependency management
In the following example, you will notice that the dependency versions are added to each and every dependency defined in the application POM file:
<dependencies> <dependency> <groupId>com.nimbusds</groupId> <artifactId>nimbus-jose-jwt</artifactId> <version>2.26</version> </dependency> <dependency> <groupId>commons-codec</groupId> <artifactId>commons-codec</artifactId> <version>1.2</version> </dependency> </dependencies>
Imagine you have a set of application POM files in a multi-module project having the same set of dependencies. If you have duplicated the artifact version with each and every dependency, then to upgrade to the latest dependency you need to update all the POM files, which can easily lead to a mess.
Not just that, if you have different versions of the same dependency used in different modules of the same project, then...