1.在pom.xml中新增pluginjava
<plugin>
<groupId>org.mortbay.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
<version>8.0.1.v20110908</version>
</plugin>apache
2.配置調試socket
2.1配置後臺監聽maven
External Tools Configuration->Program->Newpost
Maindebug
Location=E:\common\apache-maven-3.0.3\bin\mvn.bat調試
Working Diectory=your working diectoryserver
Arguments=jetty:runxml
Enviornmentblog
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