Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.0.8
-
None
-
$ mvn -v
Maven version: 2.0.8-el4j-20071205
Java version: 1.5.0_15
OS name: "windows xp" version: "5.1" arch: "x86" Family: "windows"
Description
Consider five projects A, B, C, D, E with dependencies (--> = depends-on)
A --> B, C
B --> D excluding E
C --> D
D --> E
In this scenario, as B comes before C alphabetically, dependency D of A is processed as in B and E is not included as a transitive dependency of A.
Removing the exclusion in B and putting it in C makes E appear.
To recreate the bug:
I have attached a small demo zip; after building all five projects run "mvn exec:java -Dexec.mainClass=test.A" in /A. Note that E is not included in the classpath.
(I got this result:
file:/d:/Projects/maven-test/A/target/classes/
file:/d:/Projects/maven-test/A/target/test-classes
file:/d:/m2repository/test/B/1.0-SNAPSHOT/X-1.0-SNAPSHOT.jar
file:/d:/m2repository/test/D/1.0-SNAPSHOT/D-1.0-SNAPSHOT.jar
file:/d:/m2repository/test/C/1.0-SNAPSHOT/C-1.0-SNAPSHOT.jar )
Remove the exclusion of E in B's pom and put it in C's in the same place. Then remake all projects - E is now included
(Sample oputput:
file:/d:/Projects/maven-test/A/target/classes/
file:/d:/Projects/maven-test/A/target/test-classes
file:/d:/m2repository/test/B/1.0-SNAPSHOT/B-1.0-SNAPSHOT.jar
file:/d:/m2repository/test/D/1.0-SNAPSHOT/D-1.0-SNAPSHOT.jar
file:/d:/m2repository/test/E/1.0-SNAPSHOT/E-1.0-SNAPSHOT.jar
file:/d:/m2repository/test/C/1.0-SNAPSHOT/C-1.0-SNAPSHOT.jar)