Simulating rsync in ant
When writing Cocoon apps I often include an rsync setup in my ant build scripts, to keep the src and webapp directories synchronized during development.
As Cocoon reloads most stuff (even java classes with the proper setup in 2.2) when files are modified, this is very useful.
But some people with whom I work still insist on developing on a platform which does not provide the sync command out of the box (I'm not telling which ;-) , meaning that we have to keep cross-platforms versions of rsync.
So I was looking for a way to simulate an rsync loop with ant's
Here it is - note the trick to get an infinite loop. I'm not an ant expert, so flames are welcome ;-)
The thing is...this is much slower than native rsync, so there's room for improvement.