• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

adutra/maven-dependency-tree-parser: This library contains a set of parsers that ...

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

adutra/maven-dependency-tree-parser

开源软件地址(OpenSource Url):

https://github.com/adutra/maven-dependency-tree-parser

开源编程语言(OpenSource Language):

JavaScript 59.9%

开源软件介绍(OpenSource Introduction):

Maven Dependency Tree Parser

WARNING: This project is not actively maintained anymore.

This library contains:

  • A set of parsers that parse the output of the Maven command mvn dependency:tree; different parsers can be used to parse the following output formats: text, dot, graphml and tgf. See the Maven Dependency Plugin Tree Mojo page for further details.

To use the parser, one needs to generate a file containing the tree to parse:

mvn dependency:tree -DoutputFile=/path/to/file -DoutputType=text

Then the following idiom is the recommended way to parse the file:

InputType type = InputType.TEXT;
Reader r = new BufferedReader(new InputStreamReader(new FileInputStream(...), "UTF-8"));
Parser parser = type.newParser();
Node tree = parser.parse(r);

Note that this library does NOT make any dependency resolution whatsoever per itself; it simply takes an already-built dependency tree and parses it to an object representation that is lightweight and easily reusable.

  • A set of visitors that can be used to scan the parsed tree. In particular, visitors can be used to create human-readable representations of the parsed tree. E.g. the following code transforms the parsed tree back again to the Maven standard text format:
Node tree = ...; 
StandardTextVisitor visitor = new StandardTextVisitor();
visitor.visit(tree);
System.out.println(visitor);

These utilities are intended as examples of HTML code; feel free to adapt them to your needs. To generate the HTML code and all the secondary resources (images, CSS files, etc.), run the class fr.dutra.tools.maven.deptree.extras.VelocityRendererMain with the following arguments:

  • Full path of dependency tree file to parse;
  • Dependency tree file format; one of: TEXT, DOT, GRAPHML or TGF;
  • Full path to the output directory where HTML files and static resources will be generated (this directory will be erased prior to file generation);
  • Renderer format; one of:
    • JQUERY_JSTREE (uses JQuery plugin JSTree)
    • JQUERY_TREE_TABLE (uses JQuery plugin TreeTable)



鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
yisiqi/alfred2-workflow-maven: Alfred workflow for seaching maven artifacts in m ...发布时间:2022-08-17
下一篇:
fracz/hello-maven发布时间:2022-08-17
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap