After the jetty is configured, it's much more fun to develop. The specific configuration is as follows:
First, configure the Pom.xml file, add the following : <plugin>
<groupId>Org.mortbay.jetty</groupId>
<artifactId>maven-jetty-plugin</artifactId>
</plugin>
Second, a new external tool (reproduced please specify Blog.csdn.net/whuslei)
iii. Configuring MAVEN Paths and jetty execution commands
Four, then you will see the following options on the toolbar
If this is not the case, please add it yourself:
Five, start jetty
If success occurs: Listening for transport Dt_socket at address: * * * *
------- What to do if you want to debug. Then configure:--------------------------------------------
First, modify the contents of the Environment
New A variable, named Maven_opts, with a value of
-xdebug-xnoagent-djava.compiler=none-xrunjdwp:transport=dt_socket,address=4000, Server=y,suspend=n
Second, configure remote debug
In the popup dialog box, select
Set the parameters, note that the ports here must be the same as the previous settings
third, start remote debugging
Start the jetty listener first, the command line appears prompt window
four, remote start jetty
So you can debug, how do you close it?
Set Close jetty shortcut, modify Pom.xml document
<plugin>
<groupId>Org.mortbay.jetty</groupId>
<artifactId>maven-jetty-plugin</artifactId>
<configuration>
<stopPort>9966</stopPort><!--Stop Jetty--
<stopKey>foo</stopKey>
</configuration>
</plugin>
Vi. Create a new jetty Stop command, it's simple.
Seven, stop debugging
" tricks "
1, the first to start the jetty listening port in order to start jetty remote debugging.
2. If jetty stop execution fails, the following exception occurs when the listening port is started again:
FATAL ERROR in native method:jdwp No transports initialized, Jvmtierror=agent_error_transport_init (197)
Error:transport error 202:bind failed:address already in use
ERROR:JDWP Transport Dt_socket failed to initialize, Transport_init (510)
JDWP Exit Error Agent_error_transport_init (197): No transports initialized [...] /.. /.. /SRC/SHARE/BACK/DEBUGINIT.C:690]
This is because the listener has not stopped and is still bound to the port. So you just need to find this program.
Just need to find Java.exe (if you have no other Java processes.) ), and end this off.
Original address: http://blog.csdn.net/whuslei/article/details/6647275