ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joe Schmetzer <>
Subject Re: Selecting source files if they have been compiled
Date Fri, 21 Aug 2009 08:14:33 GMT
2009/8/21 Stefan Walter <>:
> David Weintraub, 20.08.09, 23:13h CEST:
>> Patternsets to the rescue!
>> <patternset id="src">
>>     <include ${pattern1}.java/>
>> </patternset>
>> <javac
>>     sourcepath="">
>>     <patterset refid="src"/>
>> </javac>
>> Your different tasks can define different patternsets for source files.
> Thanks for your reply. That would certainly work; however, I would have to
> know the pattern in advance, which basically means I would have to
> maintain the list of source files to be copied manually (to a certain
> extent).
> The source directory contains around 700 classes in a number of packages.
> Currently, I merely tell javac to compile a few classes (~10 files) which
> provide the actual functionality/API to the outside and let it pull in
> others (~100 files - data structures, utility classes etc. spread over the
> source tree) as dependencies. Getting the whole list of classes/source
> files after they have been compiled would have the advantage that I would
> not have to care about which classes are actually used in the library.
> Best regards,
> Stefan

You can use the <depend> selector:

Use a glob mapper in the depend selector to match the java files to
the corresponding class files, and the depend selector will pick out
only those files that have newer class files.


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

View raw message