I have a dependency on a project that includes the following dependency in its POM file:
<dependency> <groupId>org.example</groupId> <artifactId>example</artifactId> <version>1.2.3</version> <scope>runtime</scope> <exclusions> <exclusion> <groupId>*</groupId> <artifactId>*</artifactId> </exclusion> </exclusions> </dependency>
when I add this project as a dependency in my ‘build.gradle’ file I would expect ‘gradle dependencies’ to show only:
my-project -> other-project -> example:1.2.3
but instead all the transitive dependencies of ‘example:1.2.3’ are also listed. It looks as if the ‘exclusions’ tag in the POM file is simply ignored by the gradle dependency resolution.
Is there a solution to this problem? Did I misunderstand anything?