On Thu, 12 Jul 2001, Jamie Echlin <[EMAIL PROTECTED]> wrote:
> I have tried to write a removeOrphans task that will delete any
> class files for which a corresponding source file exits, but no
> combination of filesets, patternsets, includes, excludes, and
> mappers does what I want it to.
If you want an ugly hack that is system dependent and won't work for
inner classes, use something like this:
<apply executable="rm" dest="${srdir}" parallel="true">
<arg value="-f" />
<srcfile />
<fileset dir="${classesdir}" includes="**/*.class" />
<mapper type="glob" from="*.class" to="*.java" />
</apply>
This will find all class files that are newer than their corresponding
source file (shouldn't happen) or don't have a corresponding source
file and remove them.
This is not a real solution, but should get you started if you want to
write your own task.
Stefan