views:

224

answers:

1

I need the list of files that were compiled during this run. I want to feed this list to a subsequent post-processing step.

I have found an option to list (see listfiles option) the files compiled during this run, but it seems only good for displaying the list on console.

Any idea?

Edit: I am talking about incremental compiles, so taking a fileset of the build folder is not an option.

Edit: One idea seems to be custom logger but I am still looking for something simpler

Edit: Another idea is to use depend selector with FileSet before javac and somehow keep the list in memory, to be used after javac has executed

+2  A: 

You simply can form a fileset about all class-files in the target-directory of the javac.

Edit: After the clarification I have to adjust my answer. I didn't such thing yet, but I would try my luck with selectors. The modified-selector looks like the one you want - a fileset of all class-files in a directory, that have changed since the last run. Here is a code-snippet:

<fileset dir="${build}">
   <filename name="**/*.class"/>
   <modified/>
</fileset>

It does not directly post-process the output of the javac-task, but should solve your problem.

Mnementh
Sorry for not being clear, but I am talking about incremental compiles, where JavaC compiles only those .java files that are newer than their compiled .class file
Tahir Akhtar
I adjusted my answer. I hope this helps.
Mnementh