用mvndebug在eclipse里跟踪调试maven的执行

如何在eclipse里跟踪调试maven的执行? 见Stackoverflow上一个人的回答:

回答者:Jean Hominal

If you want to debug Maven execution in eclipse, here is how I did it, with mostly command-line tools (no Eclipse plugin used) (may be off at some points, I haven’t done that for 6 months):

    * Run, from the command line, mvndebug in place of the mvn command. Maven will begin launching and wait for an external debugger to appear on a TCP port before resuming. Note the port number.

    * Configure in Eclipse a custom, remote debug configuration. (See http://www.ibm.com/developerworks/library/os-ecbug/ , Remote debugging) – set the port number as the one used by mvndebug. Also put the source files that you will be using for debugging in the Debug configuration.

    * Launch the remote debug configuration. Maven should resume and you will catch bugs in Eclipse.

http://stackoverflow.com/questions/2973888/debug-a-maven-plugins-execution-in-a-maven-web-project

Leave a Comment

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.