For my current purposes I have a Maven project which creates a war file, and I want to see what actual classpath it is using when creating the war.
To get the classpath all by itself in a file, you can:
mvn dependency:build-classpath -Dmdep.outputFile=cp.txt
Or add this to the POM.XML:
[...]
org.apache.maven.plugins
maven-dependency-plugin
2.9
build-classpath
generate-sources
build-classpath
[...]
From: http://maven.apache.org/plugins/maven-dependency-plugin/usage.html