Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.0.8
-
None
-
Patch
Description
Consider the following scenario:
<project> <modelVersion>4.0.0</modelVersion> <groupId>root-groupId</groupId> <artifactId>root-artifactId</artifactId> <version>1</version> <dependencies> <dependency> <groupId>direct-dependency-groupId</groupId> <artifactId>direct-dependency-artifactId</artifactId> <version>1</version> </dependency> </dependencies> <dependencyManagement> <dependencies> <dependency> <groupId>transitive-dependency-new-groupId</groupId> <artifactId>transitive-dependency-artifactId</artifactId> <version>2</version> </dependency> </dependencies> </dependencyManagement> </project>
<project> <modelVersion>4.0.0</modelVersion> <groupId>direct-dependency-groupId</groupId> <artifactId>direct-dependency-artifactId</artifactId> <version>1</version> <dependencies> <dependency> <groupId>transitive-dependency-old-groupId</groupId> <artifactId>transitive-dependency-artifactId</artifactId> <version>1</version> </dependency> </dependencies> </project>
<project> <modelVersion>4.0.0</modelVersion> <groupId>transitive-dependency-old-groupId</groupId> <artifactId>transitive-dependency-artifactId</artifactId> <version>1</version> <distributionManagement> <relocation> <groupId>transitive-dependency-new-groupId</groupId> </relocation> </distributionManagement> </project>
<project> <modelVersion>4.0.0</modelVersion> <groupId>transitive-dependency-new-groupId</groupId> <artifactId>transitive-dependency-artifactId</artifactId> <version>1</version> <dependencies> <dependency> <groupId>other-groupId</groupId> <artifactId>other-artifactId-a</artifactId> <version>1</version> </dependency> </dependencies> </project>
<project> <modelVersion>4.0.0</modelVersion> <groupId>transitive-dependency-new-groupId</groupId> <artifactId>transitive-dependency-artifactId</artifactId> <version>2</version> <dependencies> <dependency> <groupId>other-groupId</groupId> <artifactId>other-artifactId-a</artifactId> <version>1</version> </dependency> <dependency> <groupId>other-groupId</groupId> <artifactId>other-artifactId-b</artifactId> <version>1</version> </dependency> </dependencies> </project>
-------------------------------------------------------------- actual dependency:tree root-groupId:root-artifactId:jar:1 \- direct-dependency-groupId:direct-dependency-artifactId:jar:1:compile \- transitive-dependency-new-groupId:transitive-dependency-artifactId:jar:2:compile (version managed from 1) \- other-groupId:other-artifactId-a:jar:1:compile -------------------------------------------------------------- expected dependency:tree root-groupId:root-artifactId:jar:1 \- direct-dependency-groupId:direct-dependency-artifactId:jar:1:compile \- transitive-dependency-new-groupId:transitive-dependency-artifactId:jar:2:compile (version managed from 1) \- other-groupId:other-artifactId-a:jar:1:compile \- other-groupId:other-artifactId-b:jar:1:compile <-- missing from actual result --------------------------------------------------------------
As you can see from the listing above, other-groupId:other-artifactId-b:jar:1:compile is missing from the dependency list.
I have attached the zipped repo which was used when generating the dependency:tree listings shown above. I also attached a crude temporary patch which my team is currently using to resolve this issue. After ignoring whitespace changes, it is about 10 lines different.
Thanks,
Luke