I am new to Maven so still trying to understand how it works. I have a Project A which is dependent on Random1.jar. Now Random1 is added in dependency of A.
I have project B which is dependent on Project A and also on Random1.jar.
I see my colleague has written something like following :
<dependency> <groupId>A</groupId> <artifactId>AAAAA</artifactId> <version>1.0</version> <exclusions> <exclusion> <groupId>Random1</groupId> <artifactId>random1</artifactId> </exclusion> </exclusions> </dependency> <dependency> <groupId>Random1</groupId> <artifactId>random1</artifactId> <version>1.0</version> </dependency> </dependencies>
I have not understood why Random1 is excluded from A’s dependency declaration and added again. I checked the version of Random1 in A’s pom and its the same ,i.e 1.0 .