To debug a maven command execution
Did you ever have the need to debug the execution of your maven compilation in order to understand what’s going on? If that is true and you are using Maven 2.0.8+, you are able to use the mvnDebug command.
In your maven project, simply write the command mvnDebug followed by the normal goals you usually use when compiling your project. E.g.,
mvnDebug clean package
After running that command, you should see something similar to:
Preparing to Execute Maven in Debug Mode Listening for transport dt_socket at address: 8000
Now, all you have to do is to attach a Java client to the port 8000 in your IDE and add the breakpoint you wish.
Not much to say here as all explanations were made in place.