ant 很强大长(加上unix shell就更不得了: auto build + auto deployment + clustered servers). 她可以generate code (including webservice), package code, stop server, deploycode, copy config file, then start the server. 举例来说, 如果你用JAXB + XSD 来generate code:
<target name="generateMyXMLObj">
<java jar="${JAXB_HOME}/lib/jaxb-xjc.jar" fork="true" failonerror="true" maxmemory="128m">
<arg value="-p"/>
.........
<arg value="${project.dir}/content/contents.xsd"/>
................
<classpath refid="jaxb.class.path"/>
</java>
</target>
至于package war, ear 等, 就不举例了. 好好看看ant, 你会豁然开朗.