Going back to the original question of the user, I thing you should look at the <foreach> task from ant-contrib as you want, it allows you to iterate over a fileset and call a target to do whatever you want in it. There are also good <if>, <try>, <throw> and <switch> tasks that can be used to compose complex builds.
Jose Alberto -----Original Message----- From: Ken Wood [mailto:[EMAIL PROTECTED] Sent: 15 October 2002 15:08 To: Ant Developers List Subject: Re: File-related tasks, AND recursive unzip operation Well, here is an alternative.... Is the location of the zips pretty much fixed? If so, you could have a top level build.xml that unzips a zip in it's directory, and then invokes a build.xml using <ant antfile=....../> which unzips files lower down, and then invokes even lower build.xml files to unzip farther down, etc. But if the location is dynamic and you want to find these zips on the fly, well, my suggession won't work... Shawn Wilson wrote: > > Hi, I didn't get any replies on this. Does nobody have a solution? > > Thanks, > -shawn > > Shawn Wilson wrote: > > I have struggled with this problem for a while now and I believe that it > > is just not possible, but maybe someone on this list has a different idea. > > > > Basically, what I'd like to do is recurse into a directory tree which > > contains some ZIP files, and for each ZIP file expand it out into the > > directory it is found in. Using the <unzip> task I can successfully > > extract all the ZIP files, but I can't seem to find a way to make the > > destination dynamic too. This extracts them into a single root directory: > > > > <unzip dest="${build.dir}"> > > <fileset dir="${build.dir}" includes="**/sample.*.zip"/> > > </unzip> > > > > What frustrates me most about Ant is that you have all these > > file-related tasks that can work with filesets (copy, unzip, jar, etc.), > > but there appears to be now generic file-related task. That is, I could > > save myself lots of work if there was simply a task that "for this > > fileset, do X, Y, and Z" where X, Y, and Z are some other Ant tasks. > > > > Is it even possible to code such a task for Ant or does Ant's > > architecture prevent this? > > > > Thanks, > > -shawn > > > > -- > ==================================== > Shawn Wilson [EMAIL PROTECTED] > Software Developer, ATMReports.com > PH: 877-327-0873, FAX: 406-294-5806 > ==================================== > > -- > To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
