dependency:tree can be used to see the dependency tree for a given project. But what I need is to see the dependency tree for a 3rd party artifact. I guess I can create an empty project, but I'm looking for something easier (I need to do this for several artifacts).
1) Use maven dependency plugin
Create a simple project with pom.xml only. Add your dependency and run:
mvn dependency:tree
Unfortunately dependency mojo must use pom.xml or you get following error:
Cannot execute mojo: tree. It requires a project with an existing pom.xml, but the build is not using one.
2) Find pom.xml of your artifact
In pom.xml of your artifact are dependencies described. See a example for a org.springframework:spring-core
3) Use maven dependency plugin against your artifact
Part of dependency artifact is a pom.xml. That specifies it's dependency. And you can execute mvn dependency:tree on this pom.
If you use a current version of m2eclipse (which you should if you use eclipse and maven):
Select the menu entry
Navigate -> Open Maven POM
and enter the artifact you are looking for.
The pom will open in the pom editor, from which you can select the tab Dependency Hierarchy
to view the dependency hierarchy (as the name suggests :-) )
If your artifact is not a dependency of a given project, your best bet is to use a repository search engine. Many of them describes the dependencies of a given artifact.