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.
The command mvn dependency:list will list the classpath with all the jars used for compilation, runtime and test in the following format:
INFO] --- maven-dependency-plugin:2.8:list (default-cli) @ MyProject ---
[INFO]
[INFO] The following files have been resolved:
[INFO] org.netbeans.api:org-openide-filesystems:jar:RELEASE80:compile
[INFO] org.netbeans.api:org-netbeans-modules-queries:jar:RELEASE80:compile
[INFO] org.netbeans.api:org-netbeans-api-progress:jar:RELEASE80:compile
[INFO] org.netbeans.api:org-openide-dialogs:jar:RELEASE80:compile
[INFO] org.apache.derby:derby:jar:10.11.1.1:compile
[INFO] org.netbeans.api:org-openide-windows:jar:RELEASE80:compile
The only requirement is that the compilation is finished. It doesn't work if the compilation isn't ran.
An other command is The command mvn dependency:tree.