Ant 目标依赖树查看器 [英] Ant target dependency tree viewer

查看:28
本文介绍了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?

树不需要是图形化的,也可以是基于文本的 - 只是一个可以帮助我遍历某人的 ant 文件网格以调试它们的工具.

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.

不需要是Eclipse插件.然而,当一个节点被点击时会将该目标的源代码扔到编辑器上会很好.

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.

推荐答案

类似于ant调试在Eclipse中的问题.

基于 Apache 的 ANT 手册,您可以从 -projecthelp 选项.之后可能会更困难,因为各种目标可能具有交叉依赖性,因此根本不可能将层次结构表示为树.

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.

您可以修改 build.xml 以检测环境变量,例如NO_PRINT 在每个项目目标中进行测试,如果找到,只打印项目名称,不打印其他内容.该项目的依赖项将保留,并允许 ANT 遍历树并生成将被触及的不同目标的打印输出.

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.

这篇关于Ant 目标依赖树查看器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆