debug maven plugin with intellij

Old note from 2014. May be outdated.

If you need to debug your Maven plugin, first, run with the command mvnDebug <goal>. You will see something like this:

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

Now add a breakpoint with your IntelliJ to your desired line code.

Add a new Remote seettings:

Finally, run and the maven command will automatically proceed.