Using Maven 2, is there a way I can list out the jar dependencies as just the file names?
mvn dependency:build-classpath
can list the jar
Here's the command you're asking for
$ mvn dependency:tree
For large projects it can output a lot of text. I assume that you want to check that dependency tree contains a certain dependency, so you don't need a full list.
Here's how you can filter output on Windows:
$ mvn dependency:tree | findstr javax.persistence
And here's how you can do it on Linux:
$ mvn dependency:tree | grep javax.persistence
Maven way to filter the dependency tree (works in Windows cmd, MacOS and Linux shell):
$ mvn dependency:tree -Dincludes=javax.persistence:*
Maven way (Windows PowerShell):
$ mvn dependency:tree '-Dincludes=javax.persistence:*'