I am trying to use the best methods when defining data in pom.xml, so I started to study Spring source code, and I saw:
<project xmlns="http://maven.apache.org/POM/4.0.0" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <modelVersion>4.0.0</modelVersion> <groupId>org.springframework</groupId> <artifactId>spring-aop</artifactId> <packaging>jar</packaging> <version>3.1.1.RELEASE</version> ..... <dependency> <groupId>org.springframework</groupId> <artifactId>spring-beans</artifactId> <version>${project.version}</version> <scope>compile</scope> </dependency> --- <dependency> <groupId>log4j</groupId> <artifactId>log4j</artifactId> <scope>test</scope> </dependency> -----
But spring - beans also has a dependency on log4j.
Could you tell me, for best practices, to what extent should you rely on transitive dependencies?
I ask this because my first thought was not to update the log4j dependency since spring - beans already declared it.
source share