How to debug a Maven mojo with Eclipse

  • Checkout the mojo source code
  • Run mvn install on the mojo
  • Change to the project that uses the mojo for its build
  • Run mvnDebug <whatever options> -> Maven waits for a debugger to attach before executing
  • Setup a new remote debugging configuration in Eclipse, using the plugin project for source and connecting to localhost:8000 (Maven tells you which port when you run mvnDebug)

Leave a Reply