You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Robert Watkins (JIRA)" <ji...@codehaus.org> on 2011/07/26 14:03:42 UTC

[jira] Created: (MNG-5138) Dependency conflicts are extremely opaque

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

        

[jira] Commented: (MNG-5138) Dependency conflicts are extremely opaque

Posted by "Benjamin Bentmann (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MNG-5138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=274258#comment-274258 ] 

Benjamin Bentmann commented on MNG-5138:
----------------------------------------

Update the JARs in <maven-home>/lib.

> 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

        

[jira] Commented: (MNG-5138) Dependency conflicts are extremely opaque

Posted by "Robert Watkins (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MNG-5138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=274259#comment-274259 ] 

Robert Watkins commented on MNG-5138:
-------------------------------------

I can confirm that updating the aether libs fixes this. However, I also see that apparently there is a controversy about using aether-1.12.

So I guess this needs to stay open until that gets resolved. Is there a bug for the aether version by itself that could be added to this as a dependency?

> 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

        

[jira] Commented: (MNG-5138) Dependency conflicts are extremely opaque

Posted by "Robert Watkins (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MNG-5138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=274261#comment-274261 ] 

Robert Watkins commented on MNG-5138:
-------------------------------------

I meant: Is there an issue for updating the version of Aether bundled into Maven?

Thanks for the fast responses, btw.

> 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

        

[jira] Commented: (MNG-5138) Dependency conflicts are extremely opaque

Posted by "Benjamin Bentmann (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MNG-5138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=274262#comment-274262 ] 

Benjamin Bentmann commented on MNG-5138:
----------------------------------------

No.

> 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

        

[jira] Commented: (MNG-5138) Dependency conflicts are extremely opaque

Posted by "Robert Watkins (JIRA)" <ji...@codehaus.org>.
    [ 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

        

[jira] Commented: (MNG-5138) Dependency conflicts are extremely opaque

Posted by "Benjamin Bentmann (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MNG-5138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=274253#comment-274253 ] 

Benjamin Bentmann commented on MNG-5138:
----------------------------------------

After updating your mvn distro to use {{aether-\*-1.12.jar}}'s, you will find it provide the requested information:
{noformat}
[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 among [net.twasink:first:jar:1.0-SNAPSHOT -> commons-lang:commons-lang:jar:[2.5,2.5], net.twasink:second:jar:1.0-SNAPSHOT -> commons-lang:commons-lang:jar:[2.6,2.6]]
{noformat}

> 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

        

[jira] Commented: (MNG-5138) Dependency conflicts are extremely opaque

Posted by "Benjamin Bentmann (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MNG-5138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=274260#comment-274260 ] 

Benjamin Bentmann commented on MNG-5138:
----------------------------------------

https://issues.sonatype.org/browse/AETHER-94

> 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