Include/Exclude of transitive dependencies depends on alphabetic order of module names. ---------------------------------------------------------------------------------------
Key: MNG-3500 URL: http://jira.codehaus.org/browse/MNG-3500 Project: Maven 2 Issue Type: Bug Components: Dependencies Affects Versions: 2.0.8 Environment: $ 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" Reporter: David Bernhard Attachments: maven-issue.zip 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) -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira