Re: Ant question (Richard Hammer)

Mitch Amiano <[email protected]>
Newsgroups gmane.org.user-groups.trijug.juglist
Message-ID <[email protected]>
Use the ant-contrib task "for"
See http://ant-contrib.sourceforge.net/tasks/tasks/for.html
http://ant-contrib.sourceforge.net/
http://www.nabble.com/Loop-over-a-set-of-files-t2413316.html

- Mitch
>
> Today's Topics:
>
>    1. Ant question (Richard Hammer)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Fri, 23 Mar 2007 10:28:17 -0400
> From: "Richard Hammer" <[email protected]>
> Subject: [Juglist] Ant question
> To: "juglist" <[email protected]>
> Message-ID: <[email protected]>
> Content-Type: text/plain; charset=iso-8859-1; format=flowed
>
> In Ant, how do I loop over a FileSet? performing the same set of tasks 
> on each file in the FileSet?
>
> Background:
> I have a directory full of jars which need to be signed with our 
> certificate for use with Java Web Start.  But some of these jars are 
> already signed, and in my experience you can't sign a jar twice, not if 
> you want it to work thereafter, so first I have to unsign any jars which 
> have already been signed.
>
> This unsigning can be accomplished by removing everything in the 
> meta-inf directory of the jar, and I can accomplish this on one jar 
> (named subject.jar) as follows:
>
>   <target name="removeSignature">
>    <delete dir="work" />
>    <unjar src="subject.jar" dest="work" />
>    <delete dir="work/meta-inf" />
>    <jar destfile="subject.jar" basedir="work" />
>   </target>
>
> But I would like to be able to perform those steps on each jar in
>    <fileset id="libJarsList" dir="lib" includes="*.jar" />
>
> Any suggestions?
>
> Thank you,
> Rich Hammer
>
>
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.