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}">
<patternset>
<include name="*.jar"/>
</patternset>
</fileset>
</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
META-INF/lib/xalan.jar
Don
-----Original Message-----
From: Wiedmann, Jochen [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 03, 2002 6:24 AM
To: '[EMAIL PROTECTED]'
Subject: Building a Fileset dynamically
Hi,
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"/>
</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?
Thanks,
Jochen
--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>