ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Knuplesch, Jürgen <>
Subject AW: zipfileset help
Date Wed, 14 Nov 2007 08:17:34 GMT
Solution1: If you use Eclipse you can define the classpath in Eclipse (with all the jars)
and then import it via geteclipseclasspath from Ant4eclipse project.

Solution2: The hard way I solved this problem in a similar case was:

1.Using fileset to get the jar files.
2.Using the for Task from antcontrib to get through the files
3.Building the classpath step by step 

(I had to do much more, because I wrote the classpath into a Batchfile...)

This is an idea that worked for my purpose and should also solve your problem.



Jürgen Knuplesch                    
icon Systemhaus GmbH                
Sophienstraße 40                    
D-70178 Stuttgart                   

Geschäftsführer: Uwe Seltmann
HRB Stuttgart 17655
USt-IdNr.: DE 811944121 
-----Ursprüngliche Nachricht-----
Von: Frederich, Eric P21322 [] 
Gesendet: Dienstag, 13. November 2007 19:06
Betreff: zipfileset help


Is it possible to include all of the contents of all jar files inside of a directory like
"lib" into a new jar?
I can specify all jar files for a classpath while compiling like so...

        <javac srcdir="${src}" destdir="${build}" debug="on" target="5">
              <fileset dir="lib">
                <include name="**/*.jar"/>

The following gets done what I need it to do, I just don't like how I have to list all of
the .jar files explicitly

        <jar jarfile="${dist}/SVGViewer-${DSTAMP}.jar"

            <zipfileset src="lib/batik-anim.jar" />
            <zipfileset src="lib/batik-awt-util.jar" />
            <zipfileset src="lib/batik-bridge.jar" />
            <zipfileset src="lib/batik-codec.jar" />
            <zipfileset src="lib/batik-css.jar" />
            <zipfileset src="lib/batik-dom.jar" />
            <zipfileset src="lib/batik-extension.jar" />
            <zipfileset src="lib/batik-ext.jar" />
            <zipfileset src="lib/batik-gui-util.jar" />
            <zipfileset src="lib/batik-gvt.jar" />
            <zipfileset src="lib/batik-parser.jar" />
            <zipfileset src="lib/batik-script.jar" />
            <zipfileset src="lib/batik-svg-dom.jar" />
            <zipfileset src="lib/batik-svggen.jar" />
            <zipfileset src="lib/batik-swing.jar" />
            <zipfileset src="lib/batik-transcoder.jar" />
            <zipfileset src="lib/batik-util.jar" />
            <zipfileset src="lib/batik-xml.jar" />
            <zipfileset src="lib/js.jar" />
            <zipfileset src="lib/pdf-transcoder.jar" />
            <zipfileset src="lib/xalan-2.6.0.jar" />
            <zipfileset src="lib/xerces_2_5_0.jar" />
            <zipfileset src="lib/xml-apis-ext.jar" />
            <zipfileset src="lib/xml-apis.jar" />
                <attribute name="Main-Class"
value="" />

Thanks in advance,

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

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

View raw message