You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "John Williams (JIRA)" <ji...@codehaus.org> on 2008/03/28 16:26:58 UTC

[jira] Commented: (MNG-3486) Incorrect dependency resolution when there are cyclic dependencies

    [ http://jira.codehaus.org/browse/MNG-3486?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=129058#action_129058 ] 

John Williams commented on MNG-3486:
------------------------------------

This issue came up for me when I was converting a large legacy code base with a lot of cyclic dependencies to build using Maven.  I've previously tried using Ivy and I was pretty disappointed with its handling of cycles as well.  Although Ivy does not produce incorrect results, its reporting of cycles is not very useful because the report contains a lot of redundancy.  I think the best way to report cycles is probably to find the strongly connected components of the dependency graph and report those.  Just reporting SCCs is less than ideal because it doesn't give enough information to use in planning how to break cycles, but I suspect that any more detailed report would be difficult to implement and not generally useful.

> Incorrect dependency resolution when there are cyclic dependencies
> ------------------------------------------------------------------
>
>                 Key: MNG-3486
>                 URL: http://jira.codehaus.org/browse/MNG-3486
>             Project: Maven 2
>          Issue Type: Bug
>          Components: Dependencies
>    Affects Versions: 2.0.8, 2.1, Shared Components
>         Environment: Maven version: 2.0.8
> Java version: 1.5.0_12
> OS name: "linux" version: "2.6.17-1.2142_fc4smp" arch: "i386" Family: "unix"
>            Reporter: John Williams
>
> Maven's transitive dependency algorithm fails silently when there are cycles in the dependency graph.  The symptom is that Maven sometimes fails to find all the dependencies that it should.  For instance, suppose A depends on B, B and C depend on each other, and C depends on D.  Maven will fail to discover that A transitively depends on D.
> I would expect Maven to do one of two things in this case: Either it should find that A transitively depends on B, C, and D, or it should terminate with an error.  In either case it should report that there is a cycle involving B and C.

-- 
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