ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Salter <marksal...@talktalk.net>
Subject Re: Building a <fileset> using annotations
Date Wed, 22 Oct 2008 08:00:04 GMT
Chris wrote:
> Is it possible in Ant to create a <fileset> that consists of .java files
> that have some annotation?
> 
> For example, if I create a custom annotation, like "@published", and
> attach it to several classes, is there some way to get a list of such
> classes in a fileset?

Do you want the list of .java files or the list of .class files that
will be generated out of the compilation of such files?

Jan has already given an answer for the latter case.
If you do want the .java files instead, then:-

   <fileset dir="${src.path}" includes="**/*.java">
       <contains text="@published" casesensitive="no"/>
   </fileset>

might be what you want?

-- 
Mark

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


Mime
View raw message