使用mvn jetty:run很爽吧,但是怎么debug了,找了Google的N多老外文章,终于可以了,文章链接:
http://gaertig.pl/blog/en/2009/03/debug-jetty-in-maven-started-by-mvn-jetty-run.html
原文:
Set environment variable MAVEN_OPTS to:
-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n
Then in Eclipse 3 click Run > Debug Configurations > create New Remote Java Application. Remember to attach sources. Invoke Maven by mvn jetty:run and start Debug in Eclipse.