Ant 中的回显目标描述 [英] Echo target description in Ant
本文介绍了Ant 中的回显目标描述的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
<target name="compile" description="Compile the File">
<echo>Compile the File </echo>
<mkdir dir="${compilation-dir}" />
<javac srcdir="." classpath="another2" destdir="${compilation-dir}" />
</target>
我想回显目标的描述.除了复制之外,还有更好的方法吗?
I want to echo the description of the target. Is there a better way of doing this other than duplicating it?
推荐答案
我想这不是一个完美的解决方案,但至少可以避免重复描述.
I guess this is not a perfect solution, but at least you avoid duplicate descriptions.
<property name="testing.desc" value="this is the desc" />
<target name="testing" description="${testing.desc}">
<echo message="${testing.desc}" />
</target>
这篇关于Ant 中的回显目标描述的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文