Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Maven Dependency Tree - Plus (+) vs Backslash (\)

What's the difference on a mvn dependency-tree output between a '+' and a '\'. It seems fairly arbitrary to me, but I'm sure it's not...

+- com.tom:artifact:pom:6.0.0:compile
|  +- com.tom:artifact2:jar:1.0.4:compile
|  \- com.tom:artifact3:jar:6.0.0:compile
|     \- (com.tom:artifact4:jar:1.0.4:compile - omitted for duplicate)

[I've obviously removed the actual group/artifact ids...]

like image 388
Tom Avatar asked May 27 '14 11:05

Tom


People also ask

What does /- means in Maven dependency tree?

This answer is not useful. Show activity on this post. For multiple dependencies on the same level, \- will be shown for the last dependency at that level and +- will be shown for all the other dependencies at that level.

How do you determine dependency hierarchy?

Right-click the file, then select Open With > Maven POM Editor. This should give you the expected editor with the option to view the dependencies and the dependency hierarchy.


1 Answers

It's only ASCII-Line-Drawing. It only appears at the bottom line (last leave) of a branch as a kind of a south-west corner.

+- first entry first level
|  +- 1.1 second level
|  \- 1.2 second level
+- second entry first level
\- last entry first level

It also clarifies that 1.2 second level has nothing to do with second entry first level which otherwise mayby considered connected with the south pin of the plus.

like image 63
Volker Seibt Avatar answered Sep 21 '22 17:09

Volker Seibt