Anzeigen aller benutzten und ungenutzen Abhängigkeiten mit Maven.

mvn dependency:analyze

Erzeugt z.B.:
...
[INFO] --- maven-dependency-plugin:2.0:analyze (default-cli) @ twsendsms ---
[WARNING] Used undeclared dependencies found:
[WARNING] com.google.gdata:gdata-core-1.0:jar:1.41.5:compile
[WARNING] com.google.gdata:gdata-contacts-3.0:jar:1.41.5:compile
[WARNING] com.google.gdata:gdata-client-1.0:jar:1.41.5:compile
[WARNING] Unused declared dependencies found:
[WARNING] junit:junit:jar:sources:4.7:compile
[WARNING] junit:junit:jar:4.7:test
[WARNING] google-data:google-data:jar:0.0.1:compile
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS

Wie können alle transitiven Abhängigkeiten eines Projektes mit Maven angezeigt werden?

mvn dependency:tree

Ausgabe z.B.:

[INFO] Building twsendsms 0.1.0
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-dependency-plugin:2.0:tree (default-cli) @ twsendsms ---
[INFO] de.wenzlaff.twsendsms:twsendsms:jar:0.1.0
[INFO] +- junit:junit:jar:4.7:test
[INFO] +- commons-codec:commons-codec:jar:1.4:compile
[INFO] +- telekom-sdk-java:java-sdk:jar:3.1.10:compile
[INFO] +- junit:junit:jar:sources:4.7:compile
[INFO] +- log4j:log4j:jar:1.2.4:compile
[INFO] \- google-data:google-data:jar:0.0.1:compile
[INFO] +- com.google.gdata:gdata-contacts-3.0:jar:1.41.5:compile
[INFO] | \- com.google.gdata:gdata-client-1.0:jar:1.41.5:compile
[INFO] \- com.google.gdata:gdata-core-1.0:jar:1.41.5:compile
[INFO] +- com.google.collections:google-collections:jar:1.0-rc1:compile
[INFO] \- com.google.code.findbugs:jsr305:jar:1.3.9:compile
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS