I tried to run the copy-dependencies tasks in ant running in Windows. This fails since the setup task always tries to delete and copy the jar file which isn't possible since Windows doesn't delete files that are currently open. (I assume it will not work either when the lib directory for ant is not writable in Linux)
Copying the file to the lib directory doesn't work the first time anyway since the path is searched before ant is started, so the first time and has to be run twice.
It is better to keep the jar file in the current directory and reference the file with a taskdef definition, this should work in all cases.
I have attached a changed build.xml with the task defintion.