See this page for information on how to do headless generation runs which can be used as part of a build:
http://wiki.eclipse.org/Texo/Generate_in_a_build

in the examples directory in this plugin you can an example build and macrodef to use within ant.