ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Clifton Craig <>
Subject Re: particular fileset question
Date Wed, 18 Jan 2006 15:30:41 GMT
On Wednesday 18 January 2006 9:16 am, Markus Innerebner wrote:
> Hi
> > <fileset dir="${lib.dir}">
> >         <include name="folderA/*.jar" if="is.folderA.present"/>
> >         <include name="folderB/*.jar" if="is.folderB.present"/>
> > </fileset>
> also your approach does not work in my example.
> Did you try it out?
> markus
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

Yes, I tried it out. I added this to an arbitrary build in my project:
    <target name="example" depends="init" >
        <mkdir dir="${build.dir}/ex/lib1"/>
        <copy todir="${build.dir}/ex/lib1">
            <fileset dir="${build.lib.dir}"/>
        <mkdir dir="${build.dir}/ex/lib2"/>
        <copy todir="${build.dir}/ex/lib2">
            <fileset dir="${build.lib.dir}"/>
        <available file="${build.dir}/ex/lib1" type="dir" 
        <available file="${build.dir}/ex/lib2" type="dir" 
        <fileset dir="${build.dir}/ex" id="exfs">
            <include name="lib1/*.jar" if="lib1.present"/>
            <include name="lib2/*.jar" if="lib2.present"/>
        <property name="fs" refid="exfs"/>
        <echo message="Fileset: ${fs}"/>

...and I get this output:


I comment out these lines:
        <mkdir dir="${build.dir}/ex/lib2"/>
        <copy todir="${build.dir}/ex/lib2">
            <fileset dir="${build.lib.dir}"/>

and delete the ex folder under my build.dir and I get this output:

maybe something else is amiss in your code...? Let me read the other responses 
posted here...
Clifton C. Craig, Software Engineer
Intelligent Computer Systems -  A Division of GBG

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

View raw message