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: user-unsubscribe (AT) ant (DOT) apache.org
For additional commands, e-mail: user-help (AT) ant (DOT) apache.org
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}"/>
</copy>
<mkdir dir="${build.dir}/ex/lib2"/>
<copy todir="${build.dir}/ex/lib2">
<fileset dir="${build.lib.dir}"/>
</copy>
<available file="${build.dir}/ex/lib1" type="dir"
property="lib1.present"/>
<available file="${build.dir}/ex/lib2" type="dir"
property="lib2.present"/>
<fileset dir="${build.dir}/ex" id="exfs">
<include name="lib1/*.jar" if="lib1.present"/>
<include name="lib2/*.jar" if="lib2.present"/>
</fileset>
<property name="fs" refid="exfs"/>
<echo message="Fileset: ${fs}"/>
</target>
and I get this output:
Fileset:
lib1/avalon-framework.jar;lib1/batik.jar;lib1/commons-logging.jar;lib1/fop.jar;lib1/iceutils.jar;lib1/jaxen.jar;lib1/jdom.jar;lib1/saxpath.jar;lib1/xalan.jar;lib2/avalon-framework.jar;lib2/batik.jar;lib2/commons-logging.jar;lib2/fop.jar;lib2/iceutils.jar;lib2/jaxen.jar;lib2/jdom.jar;lib2/saxpath.jar;lib2/xalan.jar
I comment out these lines:
<!--
<mkdir dir="${build.dir}/ex/lib2"/>
<copy todir="${build.dir}/ex/lib2">
<fileset dir="${build.lib.dir}"/>
</copy>
and delete the ex folder under my build.dir and I get this output:
Fileset:
lib1/avalon-framework.jar;lib1/batik.jar;lib1/commons-logging.jar;lib1/fop.jar;lib1/iceutils.jar;lib1/jaxen.jar;lib1/jdom.jar;lib1/saxpath.jar;lib1/xalan.jar
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
ccc (AT) icsaward (DOT) com
ccraig (AT) gbg (DOT) com
To unsubscribe, e-mail: user-unsubscribe (AT) ant (DOT) apache.org
For additional commands, e-mail: user-help (AT) ant (DOT) apache.org