java - Ant中的echo目标描述

标签 java 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>

我想回应目标的描述。除了复制之外,还有更好的方法吗?

最佳答案

我想这不是一个完美的解决方案,但至少你避免了重复的描述。

<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/

相关文章:

java - JAX-WS RI : Best way to implement a Method Interceptor

java - 如何在 for 循环中将字符串分配给顶点?

xml - 用 Ant 替换多行文本

tomcat - 在 tomcat 上部署的 war 文件给出 404 错误

java - 如何调试 Eclipse 构建?

java - 向某些第三方 Web 应用程序发送登录请求

java - HashMap 空间问题

java - Web服务连接超时和请求超时的区别

java - 是否可以在 build.xml 中使用网站上的 jar?

java - Pmd ant 脚本给出 java.lang.NoClassDefFoundError : org/jaxen/JaxenException