代码之家  ›  专栏  ›  技术社区  ›  unj2

蚁群算法中的回波目标描述

  •  12
  • unj2  · 技术社区  · 15 年前
    <target name="compile" description="Compile the File">
            <echo>Compile the File </echo>
            <mkdir dir="${compilation-dir}" />
            <javac srcdir="." classpath="another2" destdir="${compilation-dir}" />
        </target>
    

    我想重复一下目标的描述。有比复制更好的方法吗?

    1 回复  |  直到 15 年前
        1
  •  3
  •   Jarle Hansen    15 年前

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

    <property name="testing.desc" value="this is the desc" />
    
    <target name="testing" description="${testing.desc}">
        <echo message="${testing.desc}" />
    </target>
    
    推荐文章