The first step is to configure the jetty plugin on the appropriate Web project, configured as follows:
<plugin><groupId>Org.mortbay.jetty</groupId><Artifactid>Jetty-maven-plugin</Artifactid><Configuration> <ContextPath>/</ContextPath> <Stopport>9090</Stopport> <Stopkey>Foo</Stopkey> </Configuration></plugin>
The second step is to use Eclipse's external Tools configurations to create calls to external programs,
This step also requires the addition of an environment variable maven_opts in environment to support remote debugging, with the following settings:
Maven_opts=-xms512m-xmx1024m-xx:permsize=512m-xdebug-xnoagent-djava.compiler=none-xrunjdwp:transport=dt_socket , Address=4000,server=y,suspend=n
Settings are as follows:
The third step configures the external command to stop the Web program, as above, configure:
This completes the start and stop configuration of the Web program. If you need to debug, also need to be equipped with remote debugging, in the Debug menu of Eclipse choose "Debug configurations to set, such as:
Developing and debugging Maven Web projects in eclipse using the jetty plugin instead of M2E