ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Donald Mitchell <>
Subject RE: Building a Fileset dynamically
Date Thu, 03 Jan 2002 17:50:20 GMT
For your first question, can you use a patternset to pick up all *.jar files
under a certain directory?  You can also add "exclude" tags if you want to
exclude certain jar files.
<jar jarfile="${root.jar}">
         <fileset dir="${subproject.dir}">
               <include name="*.jar"/>

For your second question, if you want to have a Jar of Jars work, you need
to specify your own MANIFEST.MF file in the META-INF directory of the Jar
file.  Below is a copy of one.  Notice the Class-Path line specifies that
this jar file contains three other jar files that can be located in the
META-INF/lib directory of the jar.  You don't have to put them in
META-INF/lib.  You can put them else where.

Manifest-Version: 1.0
Class-Path: META-INF/lib/my.jar META-INF/lib/xerces-1_4_3.jar


 -----Original Message-----
 From: Wiedmann, Jochen []
 Sent: Thursday, January 03, 2002 6:24 AM
 To: ''
 Subject: Building a Fileset dynamically
 I have a set of directories/subprojects, each of
 them creating a JAR file. In the root project I
 want to collect them all into a single JAR file,
 for example:
    <jar jarfile="root.jar">
      <fileset src="subproject1/subproject1.jar"/>
      <fileset src="subproject1/subproject2.jar"/>
      <fileset src="subproject1/subproject3.jar"/>
 The list will be growing rapidly. So I woud like
 to build the list dynamically. Is this possible?
 Btw, that brings up another, more general question:
 I'd like to run a certain Ant task for any of
 a list of directories and/or files. How to do that?
 To unsubscribe, e-mail:   
For additional commands, e-mail: <>

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

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

View raw message