How can I increase memory and enable remote debugging when using Jetty with Ant?
I am trying to use Jetty with ant and for the most part I've followed the instructions outlined here. The webapp starts up ok but I still to make a few more adjustments:
- Increase JVM memory (set the -Xms, -Xmx, and -XX:MaxPermSize)
- Enable remote debugging
My ant task is defined as such:
<target name="jetty" depends="make-webapp">
<taskdef resource="tasks.properties" loaderref="jetty.loader">
<classpath>
<fileset dir="jetty-lib/">
<include name="eclipse-jdt-core-3.1.1.jar" />
<include name="jetty-6.1.26.jar" />
<include name="jetty-ant-6.1.26.jar" />
<include name="jetty-naming-6.1开发者_如何学JAVA.26.jar" />
<include name="jetty-plus-6.1.26.jar" />
<include name="jetty-util-6.1.26.jar" />
<include name="jsp-2.1-jetty-6.1.16.jar" />
<include name="jsp-api-2.1-glassfish-9.1.1.B51.25.p1.jar" />
<include name="jsp-2.1-glassfish-9.1.1.B51.25.p1.jar" />
<include name="servlet-api-2.5-6.1.5.jar" />
</fileset>
</classpath>
</taskdef>
<mkdir dir="target/work" />
<jetty tempDirectory="target/work">
<webApp
name="myapp"
warfile="target/myapp"
contextpath="/myapp" />
</jetty>
</target>
target/myapp has everything it needs including the WEB-INF/lib and WEB-INF/classes folders.
So how can I increase memory and enable remote debugging with this set up?
This might answer your question: http://ptrthomas.wordpress.com/2006/10/10/how-to-start-and-stop-jetty-from-ant/
Use jvmarg to put the required memory and remote debugging settings.
精彩评论