Hey Mark-
no declaration of property array as far as I can see you can feel free to
create your own as in this example
public class MyTask extends Task {
private List conditions = new ArrayList();
public void add(Condition c) {
conditions.add(c);
}
public void execute() {
// iterator over the conditions
}
}
One may define and use this class like this:
<taskdef name="mytask" classname="MyTask" classpath="classes"/>
<typedef name="condition.equals"
classname="org.apache.tools.ant.taskdefs.conditions.Equals"/>
<mytask>
<condition.equals arg1="${debug}" arg2="true"/>
</mytask>
There are a number of hidden implementation details such as which
constructors are created and used but the
mechanics of creating the stub are here..more info available at
http://ant.apache.org/manual/develop.html
Maybe some of the committers can weigh in???
Martin
______________________________________________
Disclaimer and confidentiality note
Everything in this e-mail and any attachments relates to the official business
of Sender. This transmission is of a confidential nature and Sender does not
endorse distribution to any party other than intended recipient. Sender does
not necessarily endorse content contained within this transmission.
> Date: Thu, 14 Aug 2008 13:14:33 -0700
> From: [EMAIL PROTECTED]
> To: [email protected]
> Subject: Property array?
>
>
> Hi,
>
> Is there any way to make an array property in Ant? I want to write some
> stuff to a file based on an array property. Something like the user enters
> this:
>
> <property array name = "colors">
> <val = "red">
> <val = "green">
> <val = "blue">
> </property array>
>
> for (i = 0; i < ${colors}; i++) {
> <echo file="myfile.txt" append="yes" message="${colors[i]}" />
> }
>
> Yeah I'm just making the syntax up as I go along - anything like that?
>
> Thanks
> --
> View this message in context:
> http://www.nabble.com/Property-array--tp18988851p18988851.html
> Sent from the Ant - Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
_________________________________________________________________
Reveal your inner athlete and share it with friends on Windows Live.
http://revealyourinnerathlete.windowslive.com?locale=en-us&ocid=TXT_TAGLM_WLYIA_whichathlete_us