« Return to Thread: Tiny patch to enable Recursion in Ant

AW: Tiny patch to enable Recursion in Ant

by Jan.Materne :: Rate this Message:

Reply to Author | View in Thread

> I could imagine a task to set a property to the current target
>
> <location target="targetproperty" buildfile="fileproperty" />
>
> ...maybe even something for a complete stack trace/list of
> imports that
> is live


I found an old implementation of getting the information.
Enhancing with setting the property shouldnt be difficult ;-)

Jan


<project default="main">

    <scriptdef name="whereAmI" language="javascript"><![CDATA[
        selfAsTarget = self;
        currentTarget = selfAsTarget.getOwningTarget();
        currentLocation = selfAsTarget.getLocation();
        project.log(currentLocation + "Target '" + currentTarget + "'");
    ]]></scriptdef>

    <target name="one">
        <whereAmI/>
    </target>

    <target name="two">
        <whereAmI/>
    </target>

    <target name="main" depends="one,two">
        <whereAmI/>
    </target>

</project>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@...
For additional commands, e-mail: dev-help@...

 « Return to Thread: Tiny patch to enable Recursion in Ant