This week's giveaway is in the EJB and other Java EE Technologies forum. We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line! See this thread for details.
I must be having a brain fog day. I'm trying to wrap my head around the idea of how ant knows when to avoid doing work that doesn't need to be done. I think compiling java is straightforward, but what about other stuff. Suppose I have a directory tree full of *.xxx files. And another directory tree full of *.yyy files. Suppose I have /src/animals/cows/bessie.xxx that has a timestamp later than /dest/animals/cows/bessie.yyy. But /src/animals/cows/gertrude.xxx has a timestamp earlier than /dest/animals/cows/gertrude.yyy. Because of this, I need to run "mash /src/animals/cows/bessie.xxx -dest /dest/animals/cows/" but not run mash for gertrude. What ant script would do that?
Paul, Having never inspected the ant source, this won't be a definitive answer. For any operation where there is a destination file (and source files), if the destination file is considered more recent than any of the source files, then that the operaion won't then take place. For instance,
You may find in this instance that the jar never actually contains the files from classes2. L
I have no java certifications. This makes me a bad programmer. Ignore my post.
It fully depends on how the specific task is implemented. The jar task, for example, does try to examine wether the jar needs to be updated, but only uses time stamps for this - so if the jar file is newer than the file you want to add, it won't get added even if it isn't yet contained in the jar. Bug 10755 is about this problem - a workaround is to manipulate the time stamps using the touch task. If a task doesn't support conditional execution, you can use the uptodate task to set a property and conditionally execute a target. Did that help?
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus