tags:

views:

22

answers:

1
<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?

+1  A: 

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>
Jarle Hansen