Incremental compile with RAD's "workspaceBuild" ant task
Joined: Feb 20, 2009
I am using the ant task "workspaceBuild" that is included with the IBM RAD 7.5
I have no problems with it, it compiles ok.
But, now, if I have compiled a workspace I imported using a PSF file, and then I delete some ".java" source files on some of the projects from that PSF file, the ".class" files created in the previous compilation do not get deleted, so when I create the ".EAR" with de EARExport, this old files get in the ".EAR" file.
Could I do anything in order to avoid this? I mean, using the incremental compilation. I could delete all the ".class" compiled classes and compile everything over, but I just want to do an incremental compilation, because my application has a lot of eclipse projects with a lot of java classes.
How do I know that some ".java" files have been deleted, and how do I delete their corresponding ".class" files?
Is there a task to do so?
The RAD additional tasks provide some nice tasks to do things eclipse does automatically, but it does not provide a "clean" task like eclipse does when you go to the "project" menu and click on clean, and I think it should, but it does not
Not having this task means that I have to delete all the ".class" and compile everything each time I compile, or I have to implement an ANT script that looks for all the ".class" associated to its ".java" files, and delete those old ".class" files with no association to a ".java" file...
The second proposal might take longer than first one, so I should do a deletion of everything and then perform a full compile?
How does the eclipse "clean" work? How could I implement something alike? Or does the eclipse delete the ".class" file associated to a ".java" file as soon as you delete the ".java" file and then recompile?