8

次の例を考えれば、 "+ - "記号と "\ - "記号の違いは何ですか?そしてそれらは何を意味していますか?依存関係ツリー出力の "+ - "と " - "の違いは何ですか?

[INFO] [dependency:tree] 
[INFO] org.apache.maven.plugins:maven-dependency-plugin:maven-plugin:2.0-alpha-5-SNAPSHOT 
[INFO] +- org.apache.maven.reporting:maven-reporting-impl:jar:2.0.4:compile 
[INFO] | \- commons-validator:commons-validator:jar:1.2.0:compile 
[INFO] |  \- commons-digester:commons-digester:jar:1.6:compile 
[INFO] |  \- (commons-collections:commons-collections:jar:2.1:compile - omitted for conflict with 2.0) 
[INFO] \- org.apache.maven.doxia:doxia-site-renderer:jar:1.0-alpha-8:compile 
[INFO] \- org.codehaus.plexus:plexus-velocity:jar:1.1.3:compile 
[INFO]  \- commons-collections:commons-collections:jar:2.0:compile 
+0

のためにリストされている最後の兄弟であることが何Mavenのか、依存関係の特定の意味を持っていないことを示しています。それはちょうどアスキーアートです:右に行く行と下に行く行があるので、 '+'がそこにあります。 '\ - 'は90度の角度での試みです:右に行く線(そしてその下の線はもうない)。いくつかの例については、[この質問](http://stackoverflow.com/questions/1581559/ascii-library-for-creating-pretty-directory-trees)を参照してください。 – Kenney

答えて

9

これらのシンボルは意味がありませんが、ツリーの出力をより良く読み取るために存在します。

ここspring-webmvc依存関係上、それが何をするかよりよく見るために、より複雑な出力です:

[INFO] +- org.springframework:spring-webmvc:jar:4.2.2.RELEASE:compile 
[INFO] | +- org.springframework:spring-beans:jar:4.2.2.RELEASE:compile 
[INFO] | +- org.springframework:spring-context:jar:4.2.2.RELEASE:compile 
[INFO] | | \- org.springframework:spring-aop:jar:4.2.2.RELEASE:compile 
[INFO] | |  \- aopalliance:aopalliance:jar:1.0:compile 
[INFO] | +- org.springframework:spring-core:jar:4.2.2.RELEASE:compile 
[INFO] | | \- commons-logging:commons-logging:jar:1.2:compile 
[INFO] | +- org.springframework:spring-expression:jar:4.2.2.RELEASE:compile 

はレベルとして依存関係ツリーを考えてみます。最初のレベルは、直接の依存関係に対応。第2のレベルは、同じアーティファクトのために同じレベルに複数の依存性がある場合などは

基本的に、+-が他\-を示すが、図示され、それらの直接の依存関係の推移的依存性に対応しますツリーの「終わり」(すなわち、葉につながるパス)を示す。

2

プラス記号は同じレベルのいくつかのノードを示し、-記号はそのレベルの階層の単一ノードを示します。したがって

、あなたの場合には、maven-dependency-plugin+シンボル)最初のレベルで推移として依存関係maven-reporting-impldoxia-site-rendererを有し、その後maven-reporting-implのみように直接推移依存関係として(-シンボル)commons-validatorを有しており。

5

\-記号は、このノードは、現在の親

関連する問題