ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jason Rogers" <>
Subject RE: Changing Directories
Date Mon, 13 Aug 2001 14:20:34 GMT

    > Hi,
    > Thanx for the info. The dir parameter worked.
    > One more question from me... How do u add multiple set of 
    > class files in
    > different folders into a jar file?
    > For example I need to add the files in the following 
    > folders to a jar file
    > c:\work\classes & c:\work\support\supportclasses how will 
    > I be able to do
    > this ?

<property name="toplevel.classes" value="/work/classes" />
<property name="support.classes" value="/work/classes/supportclasses" />

<target name="jar" depends="<your build target>" >
    <jar jarfile="${dist}/lib/app.jar">
        <fileset dir="${toplevel.classes}"
        />    </jar>
    <jar jarfile="${dist}/lib/support.jar">
        <fileset dir="${support.classes}"

Note, you only need the includes property of the filesets if you know that
there is a possibility of other files besides class files being in those
directories.  Also, if you want them in the same jar, just put both filesets
into the same jar task.


View raw message