How to add and configure Jetty server in Maven Pom.xml

Source: Internet
Author: User

Jetty server configuration would be added as a maven plugin

<!--Jetty config- 
<build>
<pluginManagement>
<plugins><plugin> <groupId>Org.mortbay.jetty</groupId> <Artifactid>Jetty-maven-plugin</Artifactid> <version>8.1.7.v20120910</version> <Configuration> <webappsourcedirectory>${project.build.directory}/[your proj name]</webappsourcedirectory> <webApp> <!--You can put the. properties file in Configration folder other than resource folder - <Extraclasspath>${basedir}/configuration</Extraclasspath> <ContextPath>/[your proj name]</ContextPath> <Connectors> <!--Work around file locking on Windows, this app port - <connectorImplementation= "Org.eclipse.jetty.server.nio.SelectChannelConnector"> <Port>8098</Port> </connector> </Connectors> <systemproperties> <Systemproperty> <name>Log4j.config.location</name> <value>${basedir}/configuration</value> <Systemproperty> </Systemproperty> <name>App.install.root</name> <value>${basedir}</value> </Systemproperty> <Systemproperty> <name>org.apache.jasper.compiler.disablejsr199</name> <value>True</value> </Systemproperty> </systemproperties> </Configuration> </plugin> <!--Other plugins - </Plugins>
</pluginManagement>
</Build>

With this configuration, you should is able to the use MVN Jetty:run to start jetty server.

How to add and configure Jetty server in Maven Pom.xml

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.