quot; >> list.txt
fi
DELIM=,
let X=$X+1
Done
Run this first to generate the LIST in list.txt, then use the foreach
task to loop over the LIST property in your build.xml. I know it's kinda
lame, but it works.
-Rob A
-Original Message-
From: Scot P. Floess [mailto:[
ty in your build.xml. I know it's kinda
lame, but it works.
-Rob A
-----Original Message-
From: Scot P. Floess [mailto:[EMAIL PROTECTED]
Sent: Friday, June 09, 2006 3:50 AM
To: Ant Users List
Subject: Re: Implementing a loop in ANT
They do, but unfortunately not exactly what Guru nee
+1
Done
Run this first to generate the LIST in list.txt, then use the foreach
task to loop over the LIST property in your build.xml. I know it's kinda
lame, but it works.
-Rob A
> -Original Message-
> From: Scot P. Floess [mailto:[EMAIL PROTECTED]
> Sent: Friday, June 09, 2006
They do, but unfortunately not exactly what Guru needs. They support
for-loops over lists or file sets. Really, he needs something like:
...
I'm trying to figure out a way to do this using ant/ant-contrib but its
not readily apparent to me (I though it'd be trivial) to make it happen.
Wh
ant-contrib.sourceforge.net has some tasks to do this.
-Original Message-
From: "Guru Balse" <[EMAIL PROTECTED]>
Sent: Wed, June 7, 2006 2:17 pm
To: "Ant Users List"
Subject: Implementing a loop in ANT
I am sure this question has been asked before, and I co
Thanks to Dominique Devienne, Peter Reilly, Ninju Bohra, Scot P. Floess,
Ben Stringer, and Steve Lughran for giving me such good ideas on
achieving the loop functionality.I will get back to individuals if I
need further help.
The Ant Users List rocks!
-
Ben:
Wow...thats sorta neat ;) I like what you did here with build.number -
cool :)
Ben Stringer wrote:
On Wed, 2006-06-07 at 11:17 -0700, Guru Balse wrote:
I am sure this question has been asked before, and I could not see any
reasonable answer in the archives. How can I implement a l
Guru:
Ah, I see your point and what you wish to do... Hmmm - have you
considered doing your own macro def to accomplish this?
I wasn't aware of the task - I appreciate you pointing it out.
This functionality sorta inspires me, so I think I am going to
investigate writing my own macrodef t
Dominique Devienne wrote:
Ant-Contrib's accepts any type which exposes an iterator()
oh, you have just given me an idea for a devious little java1.5 class.
something that implements Iterable, for use in the fancy for loops, but
which reflects onto a class passed in and calls the iterator() m
On Wed, 2006-06-07 at 11:17 -0700, Guru Balse wrote:
> I am sure this question has been asked before, and I could not see any
> reasonable answer in the archives. How can I implement a loop in ANT
> without using scripts? For example, if I want to call a certain target
> N times, how can I do
Here is a example (beanshell rocks!):
import java.util.Iterator;
public class Loop implements Iterator {
private int begin = 0;
private int end = 10;
private int curr = 0;
public void setBegin(int b) {
begin = b;
(and test cases) just send me an email,
Ninju
- Original Message
From: Guru Balse <[EMAIL PROTECTED]>
To: Ant Users List
Sent: Wednesday, June 7, 2006 7:47:52 PM
Subject: Re: Implementing a loop in ANT
Thanks, Scot. You illustrate the problem quite well. The problem is
t
Thanks, Scot. You illustrate the problem quite well. The problem is
that N is defined as 9, but the loop only goes through 5 iterations :-(
Therefore unless we create a string on the fly using ${N} i.e. we create
${list} as "1,2,3,4,5,6,7,8,9" using java script (or other means) and
then use
Sorry, my boldfaced was turned into *YYY*
Let me repost:
Command line:
ant -DN=9
Buildfile: build.xml
[echo] val = 1
[echo] val = 2
[echo] val = 3
[echo] val = 4
[echo] val = 9
BUILD SUCCESSFUL
Total time: 2 seconds
Scot P. Floess wrote:
Guru:
You should be able to do this like:
Of course, assuming u do something like:
ant -DN=5 -f
So, I wrote a simple test script as follows:
When running I did/got this:
/home/sfloess/development/help/ant/guru> ant *-DN=9*
Buildfile: build.xml
[echo] va
google antcontrib
Jeffrey E. (Jeff) Care
[EMAIL PROTECTED]
IBM WebSphere Application
Server Development
WAS Pyxis Lead
Release Engineer
Guru Balse <[EMAIL PROTECTED]> wrote on
06/07/2006
Ant-Contrib's accepts any type which exposes an iterator()
method I believe, so you'd have to write a Java task or to
create such an type.
You could also try a recursive or (with proper
stopping condition ;-) that writes the numbers to a file, and then
it.
Using a little
I am sure this question has been asked before, and I could not see any
reasonable answer in the archives. How can I implement a loop in ANT
without using scripts? For example, if I want to call a certain target
N times, how can I do it?
Using ant-contrib is OK. Of course, something like lis
18 matches
Mail list logo