ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nolan Ring <Nolan.R...@Sun.COM>
Subject Re: any way include a fileset in a classpath conditionally?
Date Thu, 29 Aug 2002 02:03:26 GMT
Thanks very much.  I did as Dominique and Matt suggested and it's now 

I appreciate the help!


Dominique Devienne wrote:

>But <fileset> will make the build fail if its 'dir' attribute doesn't exist.
><property name="dir-that-might-exist" value="..." />
><property name="dir-that-exists-4sure" location="." />
><available property="dir2use" type="dir"
>           value="${dir-that-might-exist}"
>           file="${dir-that-might-exist}" />
><property name="dir2use" value="${dir-that-exists-4sure}" />
>After doing this, dir2use contains either the directory you're interested
>in, or the basedir on the projector any other dir, as long as the Ant regex
>of the fileset can't select any files in there. It's a similar trick that
>Matt Benson's, I'd say.
>Would be tons easier is <fileset> supported a new attribute to not barf with
>its 'dir' attribute is not a valid directory!!! --DD
>-----Original Message-----
>From: Erik Hatcher [] 
>Sent: Tuesday, August 27, 2002 12:55 PM
>To: Ant Users List
>Subject: Re: any way include a fileset in a classpath conditionally?
>Filesets cannot be conditional, but include/exclude elements have 
>if/unless attributes in exactly the same manner as target if/unless.
>	Erik
>To unsubscribe, e-mail:   <>
>For additional commands, e-mail: <>

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

View raw message