ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Beil <christian.b...@web.de>
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">
    <restrict>
        <archives>
            <zips>
                <fileset dir="${lib.dir}"/>
            </zips>
        </archives>
        <not><name name="META-INF/*.sf" casesensitive="false"/></not>
    </restrict>
</jar>

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>
<jar jarfile="final.jar">
    <zipfileset src="mergedLibs.jar" casesensitive="false">
        <exclude name="META-INF/*.SF"/>
    </zipfileset>
</jar>

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: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message