Thursday, April 25, 2013

Tips - Remote Debug with Maven 3 - Plug-in Debug

How to Debug a Maven Plug-in at Build time.

1) Open maven plug-in source code using your favorite IDE ( Eclipse, InterlliJ IDEA etc) and set break points in codes that you are going to debug.

2) Start build project using following command.

$ mvnDebug clean install 
 
3) maven starts to Listen on port 8000 till a remote debugger connects.

$ mvnDebug clean install
Preparing to Execute Maven in Debug Mode
Listening for transport dt_socket at address: 8000

 
4) Start remote debug on port 8000 using your IDE. It will trigger the build process with remote debug.