How to find unneccesary dependencies in a maven multi-project?

Posted by hstoerr on Stack Overflow See other posts from Stack Overflow or by hstoerr
Published on 2010-03-31T15:26:59Z Indexed on 2010/03/31 16:43 UTC
Read the original article Hit count: 419

If you are developing a large evolving multi module maven project it seems inevitable that there are some dependencies given in the poms that are unneccesary, since they are transitively included by other dependencies. For example this happens if you have a module A that originally includes C. Later you refactor and have A depend on a module B which in turn depends on C. If you are not careful enough you'll wind up with both B and C in A's dependency list. But of course you do not need to put C into A's pom, since it is included transitively, anyway. Is there tool to find such unneccesary dependencies?

(These dependencies do not actually hurt, but they might obscure your actual module structure and having less stuff in the pom is usually better. :-)

© Stack Overflow or respective owner

Related posts about maven-2

Related posts about dependencies