ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "andrew sliwkowski" <>
Subject RE: Properties are causing problem in 1.5
Date Sat, 30 Nov 2002 20:08:56 GMT
Does anybody have an example of using foreach(2) with parallel?
We are trying to automate installs of 1-15  machines... Today we basically
get the list of machines we need to remotely install .. and iterate with the
foreach2 task ...
which invokes a telnet task which does the remote install... the problem is
that the install takes 10 mins or so to complete..... so we end up with upto
150 minute wait before we can start the test(s)....

thanks much in advance.

-----Original Message-----
From: Geoff Meakin []
Sent: Tuesday, September 24, 2002 5:58 AM
To: Ant Users List
Subject: RE: Properties are causing problem in 1.5

This looks like the same problem I had when designing <foreach2>

Basically you have the trouble because the first time a Task
is performed, it maybeConfigures its environment (see
RuntimeConfigurable and ProjectHelper.configure) which overrides
the values of your XMLattributes with the correct property
substitutions. Now because thats already been done, if you try
and do it a second time with the same Task, the properties dont
get reset.

I had to override the RuntimeConfigurable in ANTCore to get this
working. If it helps, look at the sourcecode which I provide on
the website which fixes this problem. If it helps use the
foreach2 task jar, because it does what I believe you're trying
to do anyway.

See what you think

-----Original Message-----
From: Mark R. Diggory []
Sent: 24 September 2002 06:22 AM
Subject: Properties are causing problem in 1.5

Hello all,

I'm working with nested properties in some custom tasks. The property
"ea_survivalVar" is supposed to get set and then the the task "beta" is
supposed to pick up its value. (See below)

These work fine in 1.4.1 but now I get problems when I try to use 1.5.

Now in Ant 1.5 the property "ea_survivalVar" is not available to the
beta task. Any suggestions would be apprieciated.

<target name="error_analysis">
    <batch iterations="5" name="ea">
       <property name="ea_survivalVar" value="0.015"/>
       <beta name="ea_survivalMean" mean="0.98" std="${ea_survivalVar}"/>
       <antcall target="pva"/>

the batch tag is really simple it is just a TaskContainer that performs
its nested tasks a specific number of times:

     public void execute() throws BuildException {
         if (name != null) {
             if (iterations <= 0) {
                 throw new BuildException("You must specify the number
of iterations ( > 0 )",location);

         for(int i = 0 ; i < iterations ; i++){
             project.setProperty(name, Integer.toString(i));
             for (Enumeration e = nestedTasks.elements();
e.hasMoreElements();) {
                 Task nestedTask = (Task)e.nextElement();



To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message