I have a target which has several copy tasks; It basically copies the common jars to our set of applications from a centralized location to the lib
folder of the application.
Seeing as this is a regular copy task a jar will be copied only if it is newer than the one currently in the lib
folder.
This is the relevant part in the build.xml:
<target name="libs"/>
<copy file=... />
<copy file=... />
<copy file=... />
<antcall target="clean_compiled_classes"/>
</target>
<target name="clean_compiled_classes" if="anyOfTheLibsWereCopied">
<delete .../>
</target>
I'm looking for a way to set the anyOfTheLibsWereCopied
property before the ant call in the libs
target based on whether or not any of the files has been actually changed.
Thanks,
Ittai
I would advise having a look at the Uptodate task. I have never used it before but I guess what you are trying to do will be implemented along the following lines:
Your other option would be to implement your own ant task that does what you want. This would require a bit more work though.