Debug maven execution


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.

How to

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.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s