Brilliant! That does exactly what I want.
Only issue is that I cannot see how to exclude classes/resources from the jars. However, that does not affect my build file. Peter On Thu, Aug 19, 2010 at 4:38 PM, Jann Röder <[email protected]> wrote: > I discovered that one can also use <zipgroupfileset dir="."/> > > Am 19.08.10 17:10, schrieb Peter Reilly: >> Yes, tis is a known problem with the manual. >> >> Stefan Bodewig came up then the correct expression: >> >> <restrict> >> <name name="**/*.class"/> >> <archives> >> <zips> >> <fileset dir="lib/main" includes="**/*.jar"/> >> </zips> >> </archives> >> </restrict> >> >> The manual will be updated.. >> Peter >> >> On Thu, Aug 19, 2010 at 3:29 PM, Jann Röder <[email protected]> wrote: >>> Hi, >>> I think I might have found an error in the documentation. On the page >>> about the jar task (http://ant.apache.org/manual/Tasks/jar.html) it says: >>> >>> [quote] >>> <jar destfile="build/main/checksites.jar"> >>> <fileset dir="build/main/classes"/> >>> <zipfileset includes="**/*.class"> >>> <fileset dir="lib/main" includes="**/*.jar"/> >>> </zipfileset> >>> <manifest> >>> <attribute name="Main-Class" >>> value="com.acme.checksites.Main"/> >>> </manifest> >>> </jar> >>> >>> Creates an executable jar file with a main class >>> "com.acme.checksites.Main", and embeds all the classes from all the jars >>> in lib/main. >>> [/quote] >>> >>> However if I do that, I get this error: >>> "only single argument resource collections are supported as archives" >>> >>> My experiments have shown that this means that one may only use filesets >>> that contain exactly one file. Is this a mistake in the documentation or >>> stupidity on my part? >>> >>> Thanks, >>> Jann >>> >>> >>> --------------------------------------------------------------------- >>> To unsubscribe, e-mail: [email protected] >>> For additional commands, e-mail: [email protected] >>> >>> > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
