I've just had some fun setting up Ant under Cygwin. It all came down to getting the PATHs working correctly when the installed directories had spaces in their names. The solution was to use cygpath to first shorten into dos format then unix-ify the paths. e.g.
DOS_PATH=`cygpath -d "$LONG_PATH"`
UNIX_PATH=`cygpath -u $DOS_PATH`
So a one-liner to do the whole lot
UNIX_PATH=`cygpath -u $(cygpath -d "$LONG_PATH")`