Class DependencyTreeParser
java.lang.Object
network.ike.workspace.DependencyTreeParser
Parse the text output of
mvn dependency:tree into structured
records.
The parser handles the tree-drawing characters used by Maven's
dependency plugin (+- , \- , | , spaces)
and extracts the GAV coordinate, type, scope, and nesting depth
from each line.
Example input:
dev.ikm.tinkar:tinkar-core:pom:1.127.0-SNAPSHOT
+- dev.ikm.tinkar:collection:jar:1.127.0-SNAPSHOT:compile
| +- org.eclipse.collections:eclipse-collections-api:jar:11.1.0:compile
| \- org.eclipse.collections:eclipse-collections:jar:11.1.0:compile
\- dev.ikm.tinkar:common:jar:1.127.0-SNAPSHOT:compile
+- io.activej:activej-common:jar:6.0-rc2:compile
\- org.slf4j:slf4j-api:jar:2.0.16:compile
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordA single resolved dependency from a dependency tree. -
Method Summary
Modifier and TypeMethodDescriptionParse dependency tree text output into a list of resolved dependencies.
-
Method Details
-
parse
Parse dependency tree text output into a list of resolved dependencies.Skips blank lines and lines that don't match the expected Maven coordinate format (e.g. informational headers).
- Parameters:
treeOutput- the raw text frommvn dependency:tree- Returns:
- ordered list of resolved dependencies
-