ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vilius Vaivada" <>
Subject Pull multiple .class files from multiple .jars into one .jar
Date Tue, 01 Mar 2011 10:43:30 GMT
Hi all,

I'm new to ant, so I might be missing something fairly obvious. My
* I have a lib/ directory full of .jar files
* I have 2 patternsets for some .class files that I want to put into two
new jar files.

After a bit of googling I have this:

<target name="foo">
  <foreach target="bar" param="jar">
      <fileset dir="path" includes=" *.jar"/>

<target name="bar">
  <jar destfile="foo.jar">
    <zipfileset src="${jar}">
      <patternset refid="pattern_client"/>
      <patternset refid="pattern_ear"/>

Obviously, it doesn't quite work (and is ugly already). I could try to
collect the .class files (zipfilesets) and jar them up afterwards
(how?). But most probably there's a much better way to do this in the
first place - please advise.

Thank you

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

View raw message