About Maven-jetty-plugin Automatic restart problem

Source: Internet
Author: User

1<plugin>2<groupId>org.mortbay.jetty</groupId>3<artifactId>maven-jetty-plugin</artifactId>4<version>6.1. -</version>5<configuration>6<!--scan every 2 seconds for hot deployment--7<scanIntervalSeconds>2</scanIntervalSeconds>8<contextPath>/</contextPath>9</configuration>Ten</plugin>

The code looks like this: The jetty plug-in will automatically reload,jetty restart each time you save your code by pressing <reload>automatic</reload> default settings

To implement manual control, restart the jetty setting as follows:

1<plugin>2<groupId>org.mortbay.jetty</groupId>3<artifactId>maven-jetty-plugin</artifactId>4<version>6.1. -</version>5<configuration>6<!--scan every 2 seconds for hot deployment--7<scanIntervalSeconds>2</scanIntervalSeconds>8<reload>manual</reload>9<contextPath>/</contextPath>Ten</configuration> One</plugin>

Note: Some jetty plug-in versions do not support <RELOAD></RELOAD>, and note the version selection.

" manual reload "

From the Jetty 6.2.0pre0 version , a new, available component was added to control the redeployment of web apps.

Configuration parameters:<reload>[manual|automatic]</reload>

When you set theManual ModeAfterWebApps do not automatically scan and re-deploy. Instead, the user can control theweb when applied, by typing " carriage return line key " reload. When set to automatic mode , it is based on the scanintervalseconds
-djetty.reload

For example:"Mvn-djetty.reload=manual jetty:run" will force manual overloading, regardless of how the Pom.xml file is configured. Similarly : "mvn-djetty.reload=automatic-djetty.scanintervalseconds=10 jetty:run" will reload in the background every 10 seconds, regardless of pom.xml How to configure it in the file.

About Maven-jetty-plugin Automatic restart problem

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.