Dominique Devienne wrote:

> > From: Jack Woehr [mailto:[EMAIL PROTECTED]
> >
> > Is there a built-in property for the current target's name, e.g.,
> > ${ant.target}? Seems logical but I can't find it in the manual.
>
> No. You can access it thru a <script> though. --DD

Thank you. I macroized your suggestion and it is working very nicely:

   <!-- A macro to identify the target within which it is called -->
    <macrodef name="macro.targetname">
        <attribute name="property"/>
        <sequential>
            <script language="javascript">
                name = self.getOwningTarget().getName();
                self.getProject().setNewProperty("@{property}", name);
            </script>
        </sequential>
    </macrodef>

--
Jack J. Woehr            # "[F]ar in the empty sky a solitary esophagus slept
http://www.well.com/~jax #  upon motionless wing; everywhere brooded stillness,
http://www.softwoehr.com #  serenity, and the peace of God." - Mark Twain




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to