I have a Maven project that uses Jetty (pom), it can be run like this:
$ mvn jetty:run
Many developers want to debug it within Eclipse.
QUESTION: What is the most straightforward way to import the project into Eclipse in such a way that it can be debugged as a webapp?
MY ATTEMPT:
mvn eclipse:eclipse
or mvn eclipse:eclipse -Dwtpversion=1.5
M2_REPO
variable pointing to your Maven directory, for instance /home/nico/.m2/repository
I feel it is not far from working, but problem: I don't see how to tell Eclipse where the jars are.
Is there a better solution than copying all needed jars from the Maven repository to src/main/webapp/WEB-INF/lib
manually ?
Note: This question is rather similar but the accepted answer is only a single step of the process.
mvn eclipse:eclipse
M2_REPO
variable pointing to your Maven directory, for instance /home/nico/.m2/repository
Now the app will stop at your breakpoints, go step-by-step when you want, etc.