Hi,

-----Original Message-----
From: David Weintraub [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, November 06, 2007 5:52 PM
To: Ant Users List
Subject: Re: how to set a property based on the contents of files in a
tree?

/*
I'd just use <property name="files_path" refid="fileset"> and then
check if property "files_path" is greater than zero.

 <fileset dir="WebInfra/Source" id="fileset" includes="**/*">
   <containsregexp expression="dg" />
 </fileset>

<property name="files_path" refid="fileset">

<condition property="prop_from_condition">
    <equals arg1="${files_path}" arg2=""/>
</condition>
*/

or a bit shorter =

<fileset dir="Y:/test" id="fileset" includes="**/*">
  <containsregexp expression="dg" />
</fileset>

<condition property="prop_from_condition">
  <equals arg1="${toString:fileset}" arg2=""/>
</condition>

as already said, if it doesn't get more complicated
i would stick with the 'normal' ant solution, if i need
more i would go with <script>, <scriptdef> or an own task.


Regards, Gilbert


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to