Re: Property array?

2008-08-14 Thread markww
Ok this is what I'm going for - I wrote a simple java applet framework. The applets need to be signed. So I made an Ant file which handles signing the applet and combing all support libraries for the end user. But I'd like a section at the top of my Ant script where the user can list any addition

Re: Property array?

2008-08-14 Thread Vijay Aravamudhan
What is it you are trying to achieve? I have used a comma-separated string property, split it and iterated over it (using ant-contrib). Would that work for you rather than writing a custom task? hth, Vijay markww wrote: Hmm I just read through a custom Task tutorial, but I don't think they'll

RE: Property array?

2008-08-14 Thread markww
Hmm I just read through a custom Task tutorial, but I don't think they'll help, because you can't specify a variable number of attributes, they must be known in advance. In the examples I've read, your custom Task class has to have getters and setters for all the attributes you want to use. But if

RE: Property array?

2008-08-14 Thread Martin Gainty
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(

Re: Property array?

2008-08-14 Thread Matt Benson
You could use Ant 1.8 (unreleased, svn trunk) and implement your own PropertyHelper delegates to support something like this. -Matt --- markww <[EMAIL PROTECTED]> wrote: > > 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 pr

Property array?

2008-08-14 Thread markww
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: for (i = 0; i < ${colors}; i++) { } Yeah I'm just making the syntax up as I go along -

Re: I can't use the task

2008-08-14 Thread Steven Guitar
thats weird. this response was geared towards Mike, however i did provide a similar answer to Guy earlier. yea it seems that what you had is more in line with what he wants. On Aug 14, 2008, at 11:57 AM, Scot P. Floess wrote: This is true. However, I think Guy wants to take some action if a

Re: I can't use the task

2008-08-14 Thread Scot P. Floess
This is true. However, I think Guy wants to take some action if a property is set. Therefore the is what he probably ought to use :) On Thu, 14 Aug 2008, Steven Guitar wrote: you should try this... ${myprop} this is a silly example, but the idea is that if and only if the prope

Re: I can't use the task

2008-08-14 Thread Steven Guitar
you should try this... ${myprop} this is a silly example, but the idea is that if and only if the property exists, the given target will run. unless is used in the opposite manner. you could also do straight if conditional checking with: do stu

Re: how can tell if a property is set?

2008-08-14 Thread Steven Guitar
Guy, something else i have started using is if i plan to call a target if a property is set, i put the if/unless attributes on that target like so: ${myprop} this is a silly example, but the idea is that if and only if the property exists, the given target will run. unless is use

RE: how can tell if a property is set?

2008-08-14 Thread Martin Gainty
Guy- have you had a chance to use the looked at using available ? http://ant.apache.org/manual/CoreTasks/available.html and test with condition.. http://ant.apache.org/manual/CoreTasks/condition.html ? HTH Martin __ Disclaimer and confidentiality note

Re: how can tell if a property is set?

2008-08-14 Thread Scot P. Floess
Try this: ... Note no ${var} just var HTH, Flossy On Thu, 14 Aug 2008, Guy Catz wrote: how can tell if a property is set? I've tried using contrib this - but, if ${var} was never been set, the result is actually FALSE... I need something like - ... [http://www

how can tell if a property is set?

2008-08-14 Thread Guy Catz
how can tell if a property is set? I've tried using contrib this - but, if ${var} was never been set, the result is actually FALSE... I need something like - ... [http://www.waves.com/Objects/Images/Others/signature_logo.jpg] Guy Catz Release Manager Waves Audio Ltd T