<target name="compile" description="Compile the File">
<echo>Compile the File </echo>
<mkdir dir="${compilation-dir}" />
<javac srcdir="." classpath="another2" destdir="${compilation-dir}" />
</target>
我想回应目标的描述。除了复制之外,还有更好的方法吗?
最佳答案
我想这不是一个完美的解决方案,但至少你避免了重复的描述。
<property name="testing.desc" value="this is the desc" />
<target name="testing" description="${testing.desc}">
<echo message="${testing.desc}" />
</target>
关于java - Ant中的echo目标描述,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2754631/