ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael McCallum <gho...@xtra.co.nz>
Subject Re: Some tasks I may be working on, are they of general interest?
Date Mon, 26 Feb 2001 10:46:23 GMT
}
} One of them seems terribly obvious so I may just be missing how to do it
} using the existing binary build (I haven't downloaded the nightly build yet
} either).  It's a task definition like AntCall, but taking a list of items
} and parsing it, then passing each parsed value to an AntCall, e.g.:
I think this is a great idea. And would use it a lot. Was thinking of doing something like
that.

}
} <target name="showDwarves">
}     <antcalllist target="showOneDwarf">
}       <param name="dwarfname" value="Sneezy,Grumpy,Dopey,etc." delim="," />
}     </antcalllist>
}   </target>
}
}   <target name="showOneDwarf">
}     <echo message="Showing a dwarf named:  ${dwarfname}"/>
}   </target>
}
} Admittedly the semantics might be tricky for multiple parameters with
} different list lengths, but other than that it seems straightforward.  
I think you could just choose some arbitrary behavior and document it. 
ie 
1) cycle the params 
    <param name="dwarfname" value="Sneezy,Grumpy,Dopey" delim="," />
    <param name="dwarfhaircolour" value="Blue,Green,Red,White" delim="," />
 Would call with (Sneezy,Blue),(Grumpy,Green),(Dopey,Red),(Sneezy,White)
2) Use the shortest list.
    <param name="dwarfname" value="Sneezy,Grumpy,Dopey" delim="," />
    <param name="dwarfhaircolour" value="Blue,Green,Red,White" delim="," />
 Would call with (Sneezy,Blue),(Grumpy,Green),(Dopey,Red).

I think you would usually only want one list of things like the servers to deploy on or
the subprojects to build etc.

Michael

Mime
View raw message