I am trying to debug a Maven jetty project in eclipse. I am staring jetty using "mvn clean jetty:run". Here's the complete bat file I'm using (I'm on windows).
set MAVEN_OPTS="-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,address=4000,server=y,suspend=n"
mvn clean jetty:run
I am using the jetty-maven-plugin inside the pom file.
The bat file works ok and starts jetty without errors. Inside eclipse, I created a new debug configuration, chose "Remote Java Application" and I used 4000 for the port and localhost for the host.
When I try to run this debug configuration, I always get this error:
"Failed to connect to remote VM. Connection refused.
Connection refused: connect"
Does anyone know how I can solve this? I checked this answer, but it did not help.