Maven integration: Run vs Debug of Goals

Maybe this is a corner case ... :)

We use the Jetty Maven plugin (jetty:run) to work on web projects. I can execute that goal from the Maven toolwindow with the current maven plugin but I think it would also be good to be able to run a goal under the debugger. That would allow people to debug while using plugins that actually do some run/execute action.

The Jetty plugin is not the only one, there are more plugins like that. They make development so much easier.



I second this motion. Though I think it is possible to run m2 in debug by specifying VM options in Maven integration settings. Making it more user friendly is a way to go.

How about providing a debug config screen similar to the Run/Debug configurations? External Maven would be Remote debug, embedded - simple debug. This potentially allows the m2 goals be saved as Run configurations (sweet ;)

To take it a step further, add assignable keyboard shortcuts like it is done for Ant.



I'm not sure I understand your problem correctly, but I'm also working on debugging Jetty in Maven.

This is supported by IDEA and actually quite simple: you can configure a run/debug configuration of Maven. Run/Debug Configurations -> add a Maven one, name it and write the goal you need, jetty:run in your case.

You can run or debug it, it works like a charm.

The problem I'm facing now is hotswap or hotdeploy as Jetty calls it: I cannot get it to work.
It seems that it's not detecting the changes i make to class. On the Jetty maven plugin page, it's written that Jetty watches WEB-INF/Classes, WEB-INF/web.xml, etc.. but not the source class modification. Anyway, I can't figure out how to get that working.

To make the matter more complicated, we use filtering of resources and WEB-INF/*.xml files. The latter is filtered through the Maven war-plugin. Jetty takes it into account only if you do jetty:run-exploded or jetty:run-war.

With that specific config in mind, I'd be nice to have hotswap working when debug with Tomcat into IDEA. Right now we start Tomcat with the goal 'package', pointing on the /target directory and it works fine. But when it comes to hot redeployment, Make is not an option. And reruning the package goal doesn't work either.

It'd be nice to have some solution on the issue.



There is an issue in the jira that concerns the debugging of external maven tests:


Please sign in to leave a comment.