See previous post for more on general maven-jetty-plugin info. This time I’ll explain how to get all this to work in eclipse. Wouldn’t it be very easy to be able to execute this all from within eclipse? Follow these steps:
in Eclipse hit Run > External Tools > External Tools… to get the following popup:
First dubbelclick on Program on the left to create a new configuration. Then on the right complete information on the Main tab. Location is the path to your maven bin directory, Working Directory is your maven project and the arguments maven needs is
Next on the Environment tab add a New variable with name MAVEN_OPTS and value :
-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,address=4000,server=y,suspend=n
And you’re good to go. Launch the External tool you just configured which will start the jetty container. When you whish to debug you can create a new Run > Debug … > Remote Java Application. All you need to set is the portnumber yout entered for the jetty arguments (4000 in my example).