Maven Debug based on Eclipse.

based on http://docs.codehaus.org/display/MAVENUSER/Dealing+with+Eclipse-based+IDE

 

steps as following:

 

1. install Maven and setup Environment Variables.

2. a).maven is 2.0.8+, nothing changed the bat scripts.

    b).maven is <2.0.08, add "set MAVEN_OPTS=-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000" or uncommenting the line by deleting @REM

3.Create java project named as you like, eg. Maven Debug

4.Create two debug launch configuration, add source project.

  a).Maven(Generic debugging), the remote port is 8000 as set before.

     1)Launch the maven by using "mvnDebug install"

     2)while "Listening for transport dt_socket at address: 8000" display, then launch this debug configuration. 

  b).Maven Surefire(Surefire debugging ), the remote port is 5005.

     1)Launch the maven by using "mvnDebug install -Dmaven.surefire.debug"

 

     2)while "Listening for transport dt_socket at address: 5005" display, then launch this debug configuration. 

你可能感兴趣的:(eclipse,maven,socket,ide)