Accessing Eclipse setup in an Ant script

Does anyone know how to access the current Eclipse workspace path from within an Ant script? Several web pages mention ${workspace.dir}, but this doesn’t actually evaluate to anything when I try it. Does anyone know if I need to do something special to make it work?

On a related note, has anyone got any good tips for writing ant scripts which happily work across multiple machines with different setups? I was planning on having an xml snippit in the workspace dir which would contain the important root paths and configured for that particular machine, but I’m not sure if theres a better way.

Cheers

I don’t know exactly, since i am using idea and netbeans (and hate eclipse ;)), but I think you can edit the ant runtime properties via “Menubar->Window->Preferences->Ant->Runtime”