You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by "Frederich, Eric P21322" <er...@siemens.com> on 2007/11/13 19:06:08 UTC

zipfileset help

Hello.

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">
            <classpath>
              <fileset dir="lib">
                <include name="**/*.jar"/>
              </fileset>
            </classpath>
        </javac>

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"
basedir="${build}">

            <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" />
            <manifest>
                <attribute name="Main-Class"
value="com.siemens.pg.svgviewer.MainClass" />
            </manifest>
        </jar>

Thanks in advance,
~Eric

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


RE: zipfileset help

Posted by "Frederich, Eric P21322" <er...@siemens.com>.
Wouldn't that just include .jar files within examples.zip?
It wouldn't actually unjar them and then include their contents into a
new jar.
My .jar files aren't in a big zip, they're in a directory called "lib". 

> -----Original Message-----
> From: Bizard Nicolas (KIRO 41) 
> [mailto:nicolas.bizard@credit-suisse.com] 
> Sent: Wednesday, November 14, 2007 3:28 AM
> To: Ant Users List
> Subject: RE: zipfileset help
> 
> Hi, code example from the ant apache online manual :
> 
> <zipfileset src="examples.zip" includes="**/*.jar" />
>  
> Hope that fits your need.
> 
> Nicolas
> 
> 
> -----Original Message-----
> From: Frederich, Eric P21322 [mailto:eric.frederich@siemens.com] 
> Sent: Tuesday, November 13, 2007 7:06 PM
> To: user@ant.apache.org
> Subject: zipfileset help
> 
> Hello.
> 
> 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">
>             <classpath>
>               <fileset dir="lib">
>                 <include name="**/*.jar"/>
>               </fileset>
>             </classpath>
>         </javac>
> 
> 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"
> basedir="${build}">
> 
>             <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" />
>             <manifest>
>                 <attribute name="Main-Class"
> value="com.siemens.pg.svgviewer.MainClass" />
>             </manifest>
>         </jar>
> 
> Thanks in advance,
> ~Eric
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


RE: zipfileset help

Posted by "Bizard Nicolas (KIRO 41)" <ni...@credit-suisse.com>.
Hi, code example from the ant apache online manual :

<zipfileset src="examples.zip" includes="**/*.jar" />
 
Hope that fits your need.

Nicolas


-----Original Message-----
From: Frederich, Eric P21322 [mailto:eric.frederich@siemens.com] 
Sent: Tuesday, November 13, 2007 7:06 PM
To: user@ant.apache.org
Subject: zipfileset help

Hello.

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">
            <classpath>
              <fileset dir="lib">
                <include name="**/*.jar"/>
              </fileset>
            </classpath>
        </javac>

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"
basedir="${build}">

            <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" />
            <manifest>
                <attribute name="Main-Class"
value="com.siemens.pg.svgviewer.MainClass" />
            </manifest>
        </jar>

Thanks in advance,
~Eric

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Javadoc Task

Posted by Knuplesch, Jürgen <Ju...@icongmbh.de>.
My javadoc-Task does not create Javadoc for all of the classes I give him in a filest.

It also does not do anything, when I add certain classes.

What is wrong?

   <javadoc destdir="${dope.javadoc.xapi.tempdir}"
        failonerror="false"
        access="public"
        author="false"
        use="true"
        notree="false" 
        nonavbar="false" 
        noindex="false"
        nodeprecatedlist="false"
        nodeprecated="false"
        packagenames="de.icongmbh.*"
        windowtitle="DOPE Dokumentation"
        header="&lt;em&gt;Customer &lt;strong&gt;lt;/strong&gt;&lt;/em&gt;"
        source="1.4.2"
        classpathref="kundenapi.classpath"
        doctitle=" API"
        version="false"
        charset="iso-8859-1"
        private="false"
        maxmemory="256M"
        splitindex="true"
        verbose="true">
        <fileset dir="${cvs.exportboxbase}/P1/source">
          <include name="de/icongmbh/dope/samples/UpdateDocuments.java"/>
          <include name="de/icongmbh/dope/DOPEBuilder.java"/>
          <include name="de/icongmbh/dope/DOPENoSuchAppException.java"/>
          <include name="de/icongmbh/dope/DOPEPlainGeneralAppIF.java"/>
          <include name="de/icongmbh/dope/appserv/CustomMessagesLocaleIF"/>
          <include name="de/icongmbh/dope/appserv/DOPECompositionSession"/>
          <include name="de/icongmbh/dope/appserv/DOPESequencer.java"/>
          <include name="de/icongmbh/dope/appserv/DOPEStatus"/>
          <include name="de/icongmbh/dope/appserv/DOPEStoredDoc.java"/>
          <include name="de/icongmbh/dope/appserv/DOPEVar.java"/>
          <include name="de/icongmbh/dope/appserv/dcp/DOPEDcpIF"/>
          <include name="de/icongmbh/dope/appserv/dcp/DcpProperties"/>
          <include name="de/icongmbh/dope/appserv/dcp/AbsDOPECall"/>
          <include name="de/icongmbh/dope/appserv/dcp/DOPEHostDcp"/>
          <include name="de/icongmbh/dope/appserv/remote/DOPEPlainAliasPargIF.java"/>
          <include name="de/icongmbh/dope/appserv/remote/DOPEPlainArgsFactoryIF.java"/>
          <include name="de/icongmbh/dope/appserv/remote/DOPEPlainStatusValuesIF.java"/>
          <include name="de/icongmbh/dope/appserv/remote/DOPEPlainVarIF.java"/>
          <include name="de/icongmbh/dope/rdoc/**"/>
          <include name="de/icongmbh/dope/util/DOPEProperties.java"/>
        </fileset>
     
        <fileset dir="${cvs.exportboxbase}/P2/source">
          <include name="de/icongmbh/dope/commons/DOPEException.java"/>
          <include name="de/icongmbh/dope/commons/LogManager.java"/>
          <include name="de/icongmbh/commons/logging/ICONLogTypeIF"/>
        </fileset>
    </javadoc> 


-- 
Jürgen Knuplesch                    www.icongmbh.de
icon Systemhaus GmbH                Tel. +49 711 806098-275
Sophienstraße 40                    
D-70178 Stuttgart                   Fax. +49 711 806098-299

Geschäftsführer: Uwe Seltmann
HRB Stuttgart 17655
USt-IdNr.: DE 811944121 

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Re: Out of memory JUNIT-report

Posted by Steve Loughran <st...@apache.org>.
Knuplesch wrote:
>  In my Ant file the junitreport Task runs out of memory!
> 
> Where is the best place to increase the memory?

1. set ANT_OPTS environment variable to something like -Xmx512M

2. drop a copy of xalan (from xml.apache.org) into ANT_HOME/lib. This 
XSL engine consumes less memory than the java5 built in one.

-- 
Steve Loughran                  http://www.1060.org/blogxter/publish/5
Author: Ant in Action           http://antbook.org/

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Out of memory JUNIT-report

Posted by Knuplesch, Jürgen <Ju...@icongmbh.de>.
 In my Ant file the junitreport Task runs out of memory!

Where is the best place to increase the memory?

Is it possible to fork junitreport?


-- 
Jürgen Knuplesch                    www.icongmbh.de
icon Systemhaus GmbH                Tel. +49 711 806098-275
Sophienstraße 40                    
D-70178 Stuttgart                   Fax. +49 711 806098-299

Geschäftsführer: Uwe Seltmann
HRB Stuttgart 17655
USt-IdNr.: DE 811944121 

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Re: zipfileset help

Posted by Dominique Devienne <dd...@gmail.com>.
On Nov 13, 2007 12:06 PM, Frederich, Eric P21322
<er...@siemens.com> wrote:
> Is it possible to include all of the contents of all jar files inside of
> a directory like "lib" into a new jar?

Have you looked at <ear>? For the form of <zipfileset> which takes a
dir and includes attributes? Using <zipfileset dir="lib"
includes="*.jar" /> may work (not tested). --DD

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


AW: zipfileset help

Posted by Knuplesch, Jürgen <Ju...@icongmbh.de>.
 
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.

Greetings

Jürgen

-- 
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 [mailto:eric.frederich@siemens.com] 
Gesendet: Dienstag, 13. November 2007 19:06
An: user@ant.apache.org
Betreff: zipfileset help

Hello.

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">
            <classpath>
              <fileset dir="lib">
                <include name="**/*.jar"/>
              </fileset>
            </classpath>
        </javac>

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"
basedir="${build}">

            <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" />
            <manifest>
                <attribute name="Main-Class"
value="com.siemens.pg.svgviewer.MainClass" />
            </manifest>
        </jar>

Thanks in advance,
~Eric

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For additional commands, e-mail: user-help@ant.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org