通過(guò)Ant Jetty plugin我們可以在ant構(gòu)建腳本中直接啟動(dòng)Jetty。
<project name="Jetty-Ant integration test" basedir=".">
<path id="jetty.plugin.classpath">
<fileset dir="jetty-lib" includes="*.jar"/>
</path>
<taskdef classpathref="jetty.plugin.classpath" resource="tasks.properties" loaderref="jetty.loader" />
<target name="jetty.run">
<jetty />
</target>
</project>
<path id="jetty.plugin.classpath">
<fileset dir="jetty-lib" includes="*.jar"/>
</path>
<taskdef classpathref="jetty.plugin.classpath" resource="tasks.properties" loaderref="jetty.loader" />
<target name="jetty.run">
<jetty />
</target>
</project>