Never used Ant outside of Eclipse, but if you're using Eclipse it's probably easier to use the Ant view. No need to setup environment variables or anything, just drag your build.xml file into the Ant view tab area. (You may need to modify the config to add jars like flexTasks.jar under an entry in External Tools Configuration, can't recall.)
North America
Europe, Middle East and Africa
Asia Pacific