Reputation:
How do I print all jars passed in as dependencies to maven compiler?
-Dmaven.compiler.verbose
doesn't work.
Upvotes: 0
Views: 272
Reputation: 31087
The paths will be printed as debug logging by the Maven compiler plugin. Use -X
to enable debug logging then filter out the specific lines:
mvn -X test-compile | fgrep 'classpathElements ='
Shows:
[DEBUG] (f) classpathElements = [XXX/target/classes]
[DEBUG] (f) classpathElements = [XXX/target/test-classes, XXX/target/classes, YY
Y/.m2/repository/junit/junit/4.11/junit-4.11.jar, YYY/.m2/repository/org/hamcres/h
amcrest-core/1.3/hamcrest-core-1.3.jar]
Piping the output through less
will show more detail around these lines.
Upvotes: 1
Reputation: 839
$ mvn dependency:tree -Dverbose
Example output
[INFO] [dependency:tree]
[INFO] org.apache.maven.plugins:maven-dependency-plugin:maven-plugin:2.0-alpha-5-SNAPSHOT
[INFO] +- org.apache.maven.reporting:maven-reporting-impl:jar:2.0.4:compile
[INFO] | \- commons-validator:commons-validator:jar:1.2.0:compile
[INFO] | \- commons-digester:commons-digester:jar:1.6:compile
[INFO] | \- (commons-collections:commons-collections:jar:2.1:compile - omitted for conflict with 2.0)
[INFO] \- org.apache.maven.doxia:doxia-site-renderer:jar:1.0-alpha-8:compile
[INFO] \- org.codehaus.plexus:plexus-velocity:jar:1.1.3:compile
[INFO] \- commons-collections:commons-collections:jar:2.0:compile
Look here
Upvotes: 1