Skip to content

Commit d9d34c6

Browse files
froqueslachiewicz
authored andcommitted
MDEP-761 Tree plugin does not terminate with 3.2.0
Replaces custom code for verbose mode with existing DependencyCollectorBuilder in maven-dependency-tree. The results are slightly different, but will be consistent with other plugins that depend on maven-dependency-tree. The previous solution was walking on all dependencies including provided, which does not make sense.
1 parent 3c05dc4 commit d9d34c6

16 files changed

+313
-2140
lines changed

src/it/projects/tree-verbose-multimodule/module-a/expected.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ org.apache.maven.its.dependency:tree-multimodule-module-a:jar:1.0-SNAPSHOT
1717
| +- (org.apache.maven:maven-artifact:jar:2.0.6:compile - omitted for duplicate)
1818
| +- (org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-9-stable-1:compile - omitted for duplicate)
1919
| \- org.apache.maven.wagon:wagon-provider-api:jar:1.0-beta-2:compile
20-
| \- (org.codehaus.plexus:plexus-utils:jar:1.0.4:compile - omitted for duplicate)
20+
| \- (org.codehaus.plexus:plexus-utils:jar:1.0.4:compile - omitted for conflict with 1.4.1)
2121
+- org.apache.maven:maven-plugin-registry:jar:2.0.6:compile
2222
| +- (org.codehaus.plexus:plexus-utils:jar:1.4.1:compile - omitted for duplicate)
2323
| \- (org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-9-stable-1:compile - omitted for duplicate)
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,31 @@
1-
org.apache.maven.its.dependency:tree-multimodule-module-b:jar:1.0-SNAPSHOT WARNING: this tree contains a submodule. Once it reaches the submodule will print in nonVerbose fashion, to see the actual submodule verbose output refer to the rest of the output
1+
org.apache.maven.its.dependency:tree-multimodule-module-b:jar:1.0-SNAPSHOT
22
\- org.apache.maven.its.dependency:tree-multimodule-module-a:jar:1.0-SNAPSHOT:compile
33
\- org.apache.maven:maven-project:jar:2.0.6:compile
44
+- org.apache.maven:maven-settings:jar:2.0.6:compile
5+
| +- (org.apache.maven:maven-model:jar:2.0.6:compile - omitted for duplicate)
6+
| +- (org.codehaus.plexus:plexus-utils:jar:1.4.1:compile - omitted for duplicate)
7+
| \- (org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-9-stable-1:compile - omitted for duplicate)
58
+- org.apache.maven:maven-profile:jar:2.0.6:compile
9+
| +- (org.apache.maven:maven-model:jar:2.0.6:compile - omitted for duplicate)
10+
| +- (org.codehaus.plexus:plexus-utils:jar:1.4.1:compile - omitted for duplicate)
11+
| \- (org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-9-stable-1:compile - omitted for duplicate)
612
+- org.apache.maven:maven-model:jar:2.0.6:compile
13+
| \- (org.codehaus.plexus:plexus-utils:jar:1.4.1:compile - omitted for duplicate)
714
+- org.apache.maven:maven-artifact-manager:jar:2.0.6:compile
815
| +- org.apache.maven:maven-repository-metadata:jar:2.0.6:compile
16+
| | \- (org.codehaus.plexus:plexus-utils:jar:1.4.1:compile - omitted for duplicate)
17+
| +- (org.codehaus.plexus:plexus-utils:jar:1.4.1:compile - omitted for duplicate)
18+
| +- (org.apache.maven:maven-artifact:jar:2.0.6:compile - omitted for duplicate)
19+
| +- (org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-9-stable-1:compile - omitted for duplicate)
920
| \- org.apache.maven.wagon:wagon-provider-api:jar:1.0-beta-2:compile
21+
| \- (org.codehaus.plexus:plexus-utils:jar:1.0.4:compile - omitted for conflict with 1.4.1)
1022
+- org.apache.maven:maven-plugin-registry:jar:2.0.6:compile
23+
| +- (org.codehaus.plexus:plexus-utils:jar:1.4.1:compile - omitted for duplicate)
24+
| \- (org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-9-stable-1:compile - omitted for duplicate)
1125
+- org.codehaus.plexus:plexus-utils:jar:1.4.1:compile
1226
+- org.apache.maven:maven-artifact:jar:2.0.6:compile
27+
| \- (org.codehaus.plexus:plexus-utils:jar:1.4.1:compile - omitted for duplicate)
1328
\- org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-9-stable-1:compile
1429
+- junit:junit:jar:3.8.1:compile
30+
+- (org.codehaus.plexus:plexus-utils:jar:1.0.4:compile - omitted for conflict with 1.4.1)
1531
\- classworlds:classworlds:jar:1.1-alpha-2:compile
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,4 @@
11
org.apache.maven.its.dependency:tree-verbose2:jar:1.0-SNAPSHOT
22
+- commons-logging:commons-logging:jar:1.2:compile
3-
| +- (log4j:log4j:jar:1.2.17:compile - omitted due to optional dependency)
4-
| +- (logkit:logkit:jar:1.0.1:compile - omitted due to optional dependency)
5-
| +- (avalon-framework:avalon-framework:jar:4.1.5:compile - omitted due to optional dependency)
6-
| \- (javax.servlet:servlet-api:jar:2.3:provided - omitted due to optional dependency)
73
\- junit:junit:jar:4.13:test
8-
\- org.hamcrest:hamcrest-core:jar:1.3:compile
4+
\- org.hamcrest:hamcrest-core:jar:1.3:test

src/it/projects/tree-verbose/expected-maven2version.txt

-87
This file was deleted.

src/it/projects/tree-verbose/expected.txt

+9-12
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
org.apache.maven.its.dependency:tree-verbose:jar:1.0-SNAPSHOT
22
+- org.apache.maven:maven-project:jar:2.0.6:compile
33
| +- org.apache.maven:maven-settings:jar:2.0.6:compile
4-
| | +- (org.apache.maven:maven-model:jar:2.0.5:test - version managed from 2.0.6; scope managed from compile; omitted for duplicate)
4+
| | +- (org.apache.maven:maven-model:jar:2.0.5:test - version managed from 2.0.6; scope managed from compile; omitted for conflict with 2.0.7)
55
| | +- (org.codehaus.plexus:plexus-utils:jar:1.4.1:compile - omitted for duplicate)
66
| | \- (org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-9-stable-1:compile - omitted for duplicate)
77
| +- (org.apache.maven:maven-profile:jar:2.0.6:compile - omitted for conflict with 2.0.4)
@@ -12,7 +12,7 @@ org.apache.maven.its.dependency:tree-verbose:jar:1.0-SNAPSHOT
1212
| | +- (org.codehaus.plexus:plexus-utils:jar:1.4.1:compile - omitted for duplicate)
1313
| | +- (org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-9-stable-1:compile - omitted for duplicate)
1414
| | \- org.apache.maven.wagon:wagon-provider-api:jar:1.0-beta-2:compile
15-
| | \- (org.codehaus.plexus:plexus-utils:jar:1.0.4:compile - omitted for duplicate)
15+
| | \- (org.codehaus.plexus:plexus-utils:jar:1.0.4:compile - omitted for conflict with 1.4.1)
1616
| +- org.apache.maven:maven-plugin-registry:jar:2.0.6:compile
1717
| | +- (org.codehaus.plexus:plexus-utils:jar:1.4.1:compile - omitted for duplicate)
1818
| | \- (org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-9-stable-1:compile - omitted for duplicate)
@@ -21,12 +21,12 @@ org.apache.maven.its.dependency:tree-verbose:jar:1.0-SNAPSHOT
2121
| +- junit:junit:jar:3.8.1:compile
2222
| +- (org.codehaus.plexus:plexus-utils:jar:1.0.4:compile - omitted for conflict with 1.4.1)
2323
| \- classworlds:classworlds:jar:1.1-alpha-2:compile
24-
+- org.apache.maven:maven-profile:jar:2.0.4:test
25-
| +- (org.apache.maven:maven-model:jar:2.0.5:test - version managed from 2.0.4; scope managed from compile; omitted for duplicate)
26-
| +- (org.codehaus.plexus:plexus-utils:jar:1.1:compile - omitted for conflict with 1.4.1)
27-
| \- (org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-9:compile - omitted for conflict with 1.0-alpha-9-stable-1)
24+
+- org.apache.maven:maven-profile:jar:2.0.4:test (scope not updated to compile)
25+
| +- (org.apache.maven:maven-model:jar:2.0.5:test - version managed from 2.0.4; scope managed from compile; omitted for conflict with 2.0.7)
26+
| +- (org.codehaus.plexus:plexus-utils:jar:1.1:test - omitted for conflict with 1.4.1)
27+
| \- (org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-9:test - omitted for conflict with 1.0-alpha-9-stable-1)
2828
+- org.apache.maven:maven-model:jar:2.0.7:runtime
29-
| \- (org.codehaus.plexus:plexus-utils:jar:1.4.1:compile - omitted for duplicate)
29+
| \- (org.codehaus.plexus:plexus-utils:jar:1.4.1:runtime - omitted for duplicate)
3030
\- org.apache.xmlgraphics:batik-bridge:jar:1.7:compile
3131
+- org.apache.xmlgraphics:batik-anim:jar:1.7:compile
3232
| +- (org.apache.xmlgraphics:batik-awt-util:jar:1.7:compile - omitted for duplicate)
@@ -56,15 +56,13 @@ org.apache.maven.its.dependency:tree-verbose:jar:1.0-SNAPSHOT
5656
| \- (xml-apis:xml-apis:jar:1.3.04:compile - omitted for duplicate)
5757
+- org.apache.xmlgraphics:batik-gvt:jar:1.7:compile
5858
| +- (org.apache.xmlgraphics:batik-awt-util:jar:1.7:compile - omitted for duplicate)
59-
| +- (org.apache.xmlgraphics:batik-bridge:jar:1.7:compile - omitted for cycle)
6059
| +- (org.apache.xmlgraphics:batik-util:jar:1.7:compile - omitted for duplicate)
6160
| \- (xml-apis:xml-apis:jar:1.3.04:compile - omitted for duplicate)
6261
+- org.apache.xmlgraphics:batik-parser:jar:1.7:compile
6362
| +- (org.apache.xmlgraphics:batik-awt-util:jar:1.7:compile - omitted for duplicate)
6463
| +- (org.apache.xmlgraphics:batik-util:jar:1.7:compile - omitted for duplicate)
6564
| \- (org.apache.xmlgraphics:batik-xml:jar:1.7:compile - omitted for duplicate)
6665
+- org.apache.xmlgraphics:batik-script:jar:1.7:compile
67-
| +- (org.apache.xmlgraphics:batik-bridge:jar:1.7:compile - omitted for cycle)
6866
| +- (org.apache.xmlgraphics:batik-dom:jar:1.7:compile - omitted for duplicate)
6967
| +- (org.apache.xmlgraphics:batik-ext:jar:1.7:compile - omitted for duplicate)
7068
| +- (org.apache.xmlgraphics:batik-svg-dom:jar:1.7:compile - omitted for duplicate)
@@ -73,7 +71,7 @@ org.apache.maven.its.dependency:tree-verbose:jar:1.0-SNAPSHOT
7371
| | \- (xml-apis:xml-apis:jar:1.3.04:compile - omitted for duplicate)
7472
| \- (xml-apis:xml-apis:jar:1.3.04:compile - omitted for duplicate)
7573
+- org.apache.xmlgraphics:batik-svg-dom:jar:1.7:compile
76-
| +- (org.apache.xmlgraphics:batik-anim:jar:1.7:compile - omitted for cycle)
74+
| +- (org.apache.xmlgraphics:batik-anim:jar:1.7:compile - omitted for duplicate)
7775
| +- (org.apache.xmlgraphics:batik-awt-util:jar:1.7:compile - omitted for duplicate)
7876
| +- (org.apache.xmlgraphics:batik-css:jar:1.7:compile - omitted for duplicate)
7977
| +- (org.apache.xmlgraphics:batik-dom:jar:1.7:compile - omitted for duplicate)
@@ -86,7 +84,6 @@ org.apache.maven.its.dependency:tree-verbose:jar:1.0-SNAPSHOT
8684
+- org.apache.xmlgraphics:batik-xml:jar:1.7:compile
8785
| \- (org.apache.xmlgraphics:batik-util:jar:1.7:compile - omitted for duplicate)
8886
+- xalan:xalan:jar:2.6.0:compile
89-
| +- (xml-apis:xml-apis:jar:1.0.b2:compile - omitted for conflict with 1.3.04)
90-
| \- (xerces:xercesImpl:jar:2.6.0:compile - omitted due to optional dependency)
87+
| \- (xml-apis:xml-apis:jar:1.0.b2:compile - omitted for conflict with 1.3.04)
9188
+- xml-apis:xml-apis:jar:1.3.04:compile
9289
\- xml-apis:xml-apis-ext:jar:1.3.04:compile

0 commit comments

Comments
 (0)