[ https://jira.codehaus.org/browse/MNG-5138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=274254#comment-274254 ]
Robert Watkins commented on MNG-5138: ------------------------------------- Oooh - nice. That begs the question: how do I update Maven to aether-*-1.12? Plugin management? > Dependency conflicts are extremely opaque > ----------------------------------------- > > Key: MNG-5138 > URL: https://jira.codehaus.org/browse/MNG-5138 > Project: Maven 2 & 3 > Issue Type: Bug > Components: Dependencies > Affects Versions: 3.0.3 > Reporter: Robert Watkins > Attachments: maven_dep_conflict.tgz > > > When you get conflicts between versions of dependencies - mostly transitive, > and mostly when using ranges - it is extremely hard to see where the > conflicts are coming from. > With Maven 2.2, you could use the -X argument to get extra information, and > it was possible to see where versions were detected and where conflicts were > coming from. This is no longer the case with Maven 3, probably due to the use > of Aether. > In the attached tar ball, there are three projects ('first', 'second' and > 'third'), each generated using the maven:archetype plugin. > 'first' depends on commons-lang:commons-lang:[2.5] > 'second' depends on commons-lang:commons-lang:[2.6] > 'third' depends on both 'first' and 'second'. > When you do 'mvn clean install' on 'third', you get the following output: > $ mvn clean install > [INFO] Scanning for projects... > [INFO] > > [INFO] > ------------------------------------------------------------------------ > [INFO] Building third 1.0-SNAPSHOT > [INFO] > ------------------------------------------------------------------------ > [INFO] > ------------------------------------------------------------------------ > [INFO] BUILD FAILURE > [INFO] > ------------------------------------------------------------------------ > [INFO] Total time: 0.825s > [INFO] Finished at: Tue Jul 26 21:59:46 EST 2011 > [INFO] Final Memory: 3M/81M > [INFO] > ------------------------------------------------------------------------ > [ERROR] Failed to execute goal on project third: Could not resolve > dependencies for project net.twasink:third:jar:1.0-SNAPSHOT: Failed to > collect dependencies for [net.twasink:first:jar:1.0-SNAPSHOT (compile), > net.twasink:second:jar:1.0-SNAPSHOT (compile), junit:junit:jar:3.8.1 (test)]: > Could not resolve version conflict for [commons-lang:commons-lang::jar] with > requested versions [2.6,2.6], [2.5,2.5] -> [Help 1] > [ERROR] > [ERROR] To see the full stack trace of the errors, re-run Maven with the -e > switch. > [ERROR] Re-run Maven using the -X switch to enable full debug logging. > [ERROR] > [ERROR] For more information about the errors and possible solutions, please > read the following articles: > [ERROR] [Help 1] > http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException > Using -X and -e gives you stack traces but no more meaningful information. > Ideally, the normal output should indicate the transitive paths - e.g. that > commons-lang:2.5 is being brought in by 'first' and 2.6 by 'second'. Failing > that, the debug output could log the transitive paths, as Maven 2.2 did. > While this is an obviously simple and contrived example, real-world projects > using ranges can get a lot more complex. > Alternatively, if there is a way from the Maven CLI to switch on logging for > Aether, that might help as well. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira