What is the analogue of mvn dependency:tree in Ivy?
Asked Answered
F

2

22

How could one view the dependency tree (along with the transitive dependencies) and the reasoning for them being included, or excluded from the build?

In Maven one can do it like:

mvn dependency:tree -Ddebug

From what I understand, Ivy can produce dependency reports in an XML/HTML format, but it doesn't seem to be the same. (Correct me, if I am wrong).

Also, is this kind of thing available from the standalone Ivy (not being invoked from within an Ant context)?

Thanks!

Frisk answered 21/2, 2013 at 12:56 Comment(1)
The Ivy resolve log lists the dependencies as they are found, so by the order they appear you can guess the dependency "tree"Armistice
K
14

Take a look at <ivy:report>. This will create a HTML based report of the dependencies, and it will also create a graphml file that you can use yed to produce a report, or create a dot file and use graphviz.

Kohl answered 21/2, 2013 at 16:17 Comment(4)
God... Is there no command to generate a tree in the console, or in a plain-text file?Frisk
@Frisk Most people I show the ivy report too prefer it to Maven's tree report, which they find difficult to read.... I suppose it's a matter of taste.... Try the ivy "report" task and discover it gives additional information like module version evictions.Hokusai
I am accepting the answer, despite not getting the sort of answer I was hoping for. Thanks for the Ant task clarification. Unfortunately, in our case, we need to be able to invoke Ivy from the command-line, without the Ant context.Frisk
@krico: I'm afraid not -- on the command-line. Do let me know, if you find a solution. I don't think there's an implementation of this at all at the moment (for the console).Frisk
A
3

Have a look at <ivy:dependencytree /> that will display the dependency tree in the console.

Afteryears answered 6/3, 2018 at 13:11 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.