ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ray Madigan" <...@madigans.org>
Subject Help: ForEach2
Date Thu, 03 Jul 2003 14:23:35 GMT
I have been using the ant task foreach2 for quite a while with
no problems, until I attempted to use it with the concat task.

I am attempting to build a file with parts from different locations.

It looks like this:

<concat destfile="foo.xml" append="true">
  <filelist dir="." files="pre.xml"/>
</concat>

<foreach2 param="bar" list="a,b,c,d,e">
  <do>
    <concat destfile="foo.xml" append="true">
      <filelist dir="${bar}" files="body.xml"/>
    </concat>
  </do>
</foreach2>

<concat destfile="foo.xml" append="true">
  <filelist dir="." files="post.xml"/>
</concat>

The resultant file has the correct pre and post sections,
but the body has each body section duplicated based upon
its position in the foreach2 list (ie the third element 'c'
has its body segment duplicated three times).

Has anyone experienced anything like this?
Does anyone use foreach2?

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message