Am 12/15/16 um 23:28 schrieb Christian Schulte: > different thing. Think about the dependency management as a global > override of everything. That's how the resolver works. That's my
Maven does it that way since 2.0.something. Take a look at this pom: <http://repo.maven.apache.org/maven2/junit/junit/4.12/junit-4.12.pom>. You'll see it declares a dependency on hamcrest-core in version 1.3. Here is a pom managing that version to 1.1. <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>localhost</groupId> <artifactId>test</artifactId> <version>1.0-SNAPSHOT</version> <packaging>jar</packaging> <dependencyManagement> <dependencies> <dependency> <groupId>org.hamcrest</groupId> <artifactId>hamcrest-core</artifactId> <version>1.1</version> </dependency> </dependencies> </dependencyManagement> <dependencies> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>4.12</version> </dependency> </dependencies> </project> Run mvn -X dependency:tree on that pom. You'll see that the version of the transitive dependency of junit will have been managed to what I put into that pom. That's exactly what I would expect to happen. [INFO] localhost:test:jar:1.0-SNAPSHOT [INFO] \- junit:junit:jar:4.12:compile [INFO] \- org.hamcrest:hamcrest-core:jar:1.1:compile (version managed from 1.3) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org