One really nice feature of maven is the dependency resolution stuff
that it does. The dependency plugin also has an analyse goal that can
detect a number of problems with your dependencies. It can detect
libraries you use but haven’t declared in your POM, but work through
transitive dependencies. This can cause build problems when you remove
the library that was dragging in the undeclared dependency. It can also
work out which dependencies you are no longer using, but have a declared
mojo-jojo david% mvn dependency:analyze [INFO] Scanning for projects... ... [INFO] [dependency:analyze] [WARNING] Used undeclared dependencies found: [WARNING] commons-collections:commons-collections:jar:3.2:compile [WARNING] commons-validator:commons-validator:jar:1.3.1:compile [WARNING] org.apache.myfaces.core:myfaces-api:jar:1.2.6:compile [WARNING] Unused declared dependencies found: [WARNING] javax.faces:jsf-api:jar:1.2_02:compile ...