dependencymanagement and dependencies in maven

Dependency Management allows to consolidate and centralize the management of dependency versions without adding dependencies which are inherited by all children. This is especially useful when you havea set of projects (i.e. more than one) that inherits a common parent.

Another extremely important use case of dependencyManagement is the control of versions of artifacts used in transitive dependencies.

We still need to define dependencies in the child POM to show that we are using them. They are not actually included in the child projects just because they are in <dependencyManagement> in the parent POM. Enclosing dependencies in <dependencyManagement> centralizes management of the version, scope, and exclusions for each dependency, if and when we decide to use it. Maven’s guide to dependency management gets into all the details


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s