Ant 目标依赖关系树查看器
是否有一个软件(或 Eclipse 插件)
在给定目标的情况下允许我将目标依赖项视为树?
该树不需要是图形的,可以是基于文本的——只是一个可以帮助我遍历某人的 ant 文件网格来调试它们的工具。
不需要是 Eclipse 插件。然而,当单击一个节点时,将该目标的源代码扔到编辑器上会很好。
IS there a piece of software (or an eclipse plug-in) which,
given a target, would allow me to view the target dependency as a tree?
The tree does not need to be graphical, could be text based - just a tool that would help me traverse thro someone's mesh of ant files to debug them.
Does not need to be an Eclipse plug-in. However, would be nice when a node is clicked would throw the source of that target onto an editor.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我想要同样的东西,但是,像 David 一样,我最终只写了一些代码(Python):
I wanted the same thing, but, like David, I ended up just writing a bit of code (Python):
类似于问题 Eclipse 中的 ant 调试。
根据Apache的ANT手册,您可以从
-projecthelp开始代码>选项。之后可能会更加困难,因为各个目标可能具有交叉依赖性,因此根本不可能将层次结构表示为树。
您可以修改build.xml来检测环境变量,例如NO_PRINT,它在每个项目目标中进行测试,如果找到,则仅打印出项目名称而不打印其他内容。该项目的依赖关系将保留并允许 ANT 遍历树并生成将触及的不同目标的打印输出。
Similar to question ant debugging in Eclipse.
Based on Apache's ANT manual, you can start with the
-projecthelp
option. It might be more difficult after that because the various targets may have cross-dependencies and thus be impossible to represent the hierarchy as a tree at all.You could modify the build.xml to detect an environment variable, e.g. NO_PRINT which is tested in each project target and if found, only print out the project name and nothing else. The depencies for the project would remain and allow ANT to walk the tree and produce a printout of the different targets that would get touched.
我创建了一个 java 命令行工具,可以分析 ant 构建脚本和目标之间的依赖关系。
我正在分析一个调用其他构建脚本的 ant 脚本,它们总共有超过 1000 个 ant 目标。工具是摆脱困境的唯一方法。它可以打印 ant 目标依赖树并标记未使用的目标。
https://github.com/kunterbunt2/antanalyzer
也许这就是您正在寻找的东西。
如果自述文件不够好,请随时提出问题。
还有一些单元测试来展示该工具。
I created a java command line tool that can analyze ant build scrips and the dependencies between the targets.
I am analyzing an ant script that calls other build scripts adn in total they have over 1000 ant targets. A tool was the only way to get through that mess. It can print ant target dependency trees and mark unused targets.
https://github.com/kunterbunt2/antanalyzer
Maybe this is what you where looking for.
Feel free to ask questions in case the readme is nto good enough.
There are also some unit test to showcase the tool.