使用maven jetty调试web程序

1.在pom.xml中新增plugin

  <plugin>
   <groupId>org.mortbay.jetty</groupId>
   <artifactId>jetty-maven-plugin</artifactId>
   <version>8.0.1.v20110908</version>
  </plugin>

 

2.配置调试

2.1配置后台监听

External Tools Configuration->Program->New

Main

Location=E:\common\apache-maven-3.0.3\bin\mvn.bat

Working Diectory=your working diectory

Arguments=jetty:run

 

Enviornment

MAVEN_OPTS=-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,address=8080,server=y,suspend=y

 

2.2配置debug Configurations

Debug Configurations->Remote Java Application->New

Project=your project

Connection Properties

Host=localhost

port=8080

posted @ 2011-12-17 00:43  通灵宝玉  阅读(474)  评论(0编辑  收藏  举报