Hello,

I have a type of target I call a lot.  Every time I write this type of
target, the only difference from the last time is in some "parameters".  I'm
wondering if there's any way to write a "template target" and call it like a
function (i.e. parameterize it).

I figure I could do this like:

        <target name="function">
                <echo message="${global.property.foo}" />
        </target>

        <property name="global.property.foo" value="A">
        <call target="function" force="yes">

        <property name="global.property.foo" value="B">
        <call target="function" force="yes">

but I'd prefer something like 

        <target name="function">
                <echo message="${my.parameters.foo}" />
        </target>
        
        <call target="function" parameters="foo=A" />
        <call target="function" parameters="foo=B" />

This is clearer and easier to maintain.  Does Nant have any mechanism like
this?

-D. Bron



-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?  SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
_______________________________________________
Nant-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-users

Reply via email to