Eclipse plug-in for Maven Jetty

Source: Internet
Author: User

Jetty Plugin: http://jettylauncher.sourceforge.net/updates/

 

 

Jetty plug-in is often used in Maven projects. MVN jetty: Run starts port 8080 by default. Tomcat usually occupies this port. You can manually modify the startup port of jetty plug-in by running the following command:

MVN jetty: Run-djetty. Port = 9999

Another method is to modify the POM file. The jetty plug-in code is as follows:

<Plugin>
<Groupid> org. mortbay. jetty </groupid>
<Artifactid> Maven-jetty-plugin </artifactid>
<Version> 6.1.6 </version>
<Configuration>
<Connectors>
<Connector implementation = "org. mortbay. Jetty. NiO. selectchannelconnector">
<Port> 9999 </port>
<Maxidletime> 60000 </maxidletime>
</Connector>
</Connectors>
</Configuration>
</Plugin>

Enter the port you want to start on the port node. Mine is 9999. Jetty plugin Official Website:

Http://docs.codehaus.org/display/JETTY/Maven+Jetty+Plugin

During project packaging or deployment, you must skip the test code section. The command is as follows:

MVN-dmaven. Test. Skip = true package

 

Run
MVN jetty: Run-war

Result error prompt
The plugin 'org. mortbay. jetty: Maven-jetty-plugin 'does not exis

After adding such a sentence in settings. XML, solve the problem.

Reference <plugingroups>
<Plugingroup> org. mortbay. jetty </plugingroup>
</Plugingroups>

The cause of my above error is that the jetty plug-in is not configured in POM. xml of my project.
The solution can also be added to the Pom. xml file of your project.

Reference

<Project>
[...]
<Build>
<Finalname> simple-webapp </finalname>
<Plugins>
<Plugin>
<Groupid> org. mortbay. jetty </groupid>
<Artifactid> Maven-jetty-plugin </artifactid>
</Plugin>
</Plugins>
</Build>
[...]
</Project>

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.