---
title: "maven-jetty-plugin"
author: "thunder_yan"
date: "2013-06-28T09:30:29Z"
tags: []
categories: ["Web前端"]
slug: "maven-jetty-plugin"
draft: false
lastmod: "2013-06-28T09:30:29Z"
id: 1895508
url: "https://thunder-yan.iteye.com/blog/1895508"
---

具体做法如下：

1 在pom.xml文件中配置maven-jetty-plugin插件。

```
<plugin>
				<groupId>org.mortbay.jetty</groupId>
				<artifactId>jetty-maven-plugin</artifactId>
				<configuration>
					<scanIntervalSeconds>10</scanIntervalSeconds>
					<webApp>
						<contextPath>/test</contextPath>
					</webApp>
					<connectors>
						<connector implementation="org.eclipse.jetty.server.nio.SelectChannelConnector">
							<port>8080</port>
							<maxIdleTime>60000</maxIdleTime>
						</connector>
					</connectors>
				</configuration>
			</plugin>
```

 

2.启动jetty服务器

```
jetty:run
```