Reputation: 148
I have a project using various hadoop libraries, in which I want to have all dependencies from group "org.apache.hadoop" to have same version i.e. 2.7.6, for even the transitive dependencies.
E.g. hive-hcatalog-core:jar:2.3.2 - depends on hadoop-mapreduce-client-core:jar:2.7.2 , but I want 2.7.6 version of hadoop-mapreduce-client-core to be used explicitly. Similary for many libraries within org.apache.hadoop.
Edit - I made my stuff work by adding such conflicting dependencies explicitly in my pom.But I was wondering if we could enforce something like this.
Upvotes: 1
Views: 315
Reputation: 35805
If you really want to change the transitive dependencies (see khmarbaise's comment), you can do so with <dependencyManagement>
. It allows you to define the version of all dependencies, including transitive ones.
See e.g.
differences between dependencymanagement and dependencies in maven
Upvotes: 1