ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matt Benson <gudnabr...@yahoo.com>
Subject Re: Ant's "find" Equivalent
Date Mon, 04 Apr 2005 19:21:05 GMT
--- Kyle Adams <kadams@gfs.com> wrote:
> I'd like to be able to set a property based on a
> condition that recursively searches for *.java files
> (much the way a "find ./src -name *.java" would) and
> then use <target ... unless="${src.found}"> to
> control execution of the javadocs target.  That
> said, I'm not coming up with any good ways to do
> this in Ant.
> 
> Any ideas?

Yeah, easiest way is:

<target name="javadoc" if="src.found">
  ...
</target>
<target name="checkjava">
  <pathconvert property="src.found"
               pathsep=" " setonempty="false">
    <path>
      <fileset dir="src" includes="**/*.java" />
    </path>
  </pathconvert>
</target>

HTH,
Matt
> 
> Thanks,
> Kyle
> 
> _____
> 
> Kyle Adams | Java Developer  |  Gordon Food Service 
> |  616-717-6162
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> user-unsubscribe@ant.apache.org
> For additional commands, e-mail:
> user-help@ant.apache.org
> 
> 


		
__________________________________ 
Yahoo! Messenger 
Show us what our next emoticon should look like. Join the fun. 
http://www.advision.webevents.yahoo.com/emoticontest

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message