ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Beil <>
Subject Re: The new archives task
Date Thu, 04 Mar 2010 16:17:26 GMT
Thanks Stefan,

that's the solution.
The following script bundles all files from all jar files in 
${lib.dir}into a single jar and filters out the signature files from the 
META-INF directories.

<jar jarfile="final.jar">
                <fileset dir="${lib.dir}"/>
        <not><name name="META-INF/*.sf" casesensitive="false"/></not>

This is really powerful. But this power seems to come with some costs.
The above script takes about 12 minutes on my machine.

The following script first bundles all jars into one mergedLibs.jar and 
then bundles the final jar using <zipfileset>, filtering with exclude.
This takes 1 minute and 20 seconds.

<jar jarfile="mergedLibs.jar">
    <zipgroupfileset dir="${lib.dir}"/>
<jar jarfile="final.jar">
    <zipfileset src="mergedLibs.jar" casesensitive="false">
        <exclude name="META-INF/*.SF"/>

Just wanted to let people know. :-)
And by the way, big kudos for this great Ant 1.8 release.

-- Christian

Stefan Bodewig schrieb:
> That's right.  To filter the contents of the <archives> wrap a
> <restrict> around it with the selectors you need.

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

View raw message